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

product(RObject) -- product of elements of an R object

Description

Return the product of all values in an R vector. This wraps R's prod function.

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

o1 = [1] 2 4 6

o1 : RObject of type integer
i2 : product x

o2 = [1] 48

o2 : RObject of type double

See also

Ways to use this method:


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