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

new RObject from Sequence -- create an R pairlist from a sequence

Description

Converts a Macaulay2 Sequence to an R pairlist, the linked-list type used internally by R for function argument lists.

i1 : RObject (2, 3, 5)

o1 = [[1]]
     [1] 2

     [[2]]
     [1] 3

     [[3]]
     [1] 5


o1 : RObject of type pairlist

When any elements are Option objects, the keys become names.

i2 : RObject (baz => 3, qux => 4)

o2 = $baz
     [1] 3

     $qux
     [1] 4


o2 : RObject of type pairlist

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/objects.m2:353:0.