Macaulay2 » Documentation
Packages » RInterface » RObject » new RObject from RR
next | previous | forward | backward | up | index | toc

new RObject from RR -- create an R double vector from a real or rational number

Description

Converts a Macaulay2 RR (floating-point real number) to an R double vector of length 1.

i1 : RObject pi

o1 = [1] 3.141593

o1 : RObject of type double

QQ and other Number subtypes are also converted to R double vectors.

i2 : RObject (3/2)

o2 = [1] 1.5

o2 : RObject of type double

See also

Ways to use this method:

  • new RObject from Number
  • new RObject from RR -- create an R double vector from a real or rational number

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