Macaulay2 » Documentation
Packages » RInterface :: miscellaneous mathematical functions on RObjects
next | previous | forward | backward | up | index | toc

miscellaneous mathematical functions on RObjects -- miscellaneous mathematical functions on R objects

When passed an RObject, abs and sqrt do the expected thing, calling the corresponding R functions to compute the absolute value and square root of the given input, respectively.

i1 : x = RObject(-2)

o1 = [1] -2

o1 : RObject of type integer
i2 : abs x

o2 = [1] 2

o2 : RObject of type integer
i3 : sqrt oo

o3 = [1] 1.414214

o3 : RObject of type double