Macaulay2 » Documentation
Packages » RInterface :: sum(RObject)
next | previous | forward | backward | up | index | toc

sum(RObject) -- sum of R object

Description

This function returns the sum of all the values present in x. It wraps around R's sum function.

i1 : x = RObject {2, 4, 6}

o1 = [1] 2 4 6

o1 : RObject of type integer
i2 : sum x

o2 = [1] 12

o2 : RObject of type integer

Ways to use this method:


The source of this document is in /build/reproducible-path/macaulay2-1.25.05+ds/M2/Macaulay2/packages/RInterface/doc.m2:834:0.