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

special mathematical functions on RObjects -- special mathematical functions on R objects

When at least one of its arguments is an RObject, Beta calls R's beta function.

i1 : Beta(RObject 1, RObject 2)

o1 = [1] 0.5

o1 : RObject of type double

Gamma, lngamma, and Digamma call R's gamma, lgamma, and digamma, respectively, when passed an RObject.

i2 : Gamma RObject 2

o2 = [1] 1

o2 : RObject of type double
i3 : lngamma RObject 2

o3 = [1] 0

o3 : RObject of type double
i4 : Digamma RObject 2

o4 = [1] 0.4227843

o4 : RObject of type double

binomial calls R's choose when one of its arguments is an RObject, and the postfix operator ! calls R's factorial when passed an RObject.

i5 : binomial(RObject 4, RObject 2)

o5 = [1] 6

o5 : RObject of type double
i6 : (RObject 3)!

o6 = [1] 6

o6 : RObject of type double