Macaulay2 » Documentation
Packages » RInterface » RObject » RObject _ Thing » RObject _ Thing = Thing
next | previous | forward | backward | up | index | toc

RObject _ Thing = Thing -- replace a single element of an R object

Description

Replace a single element of an R vector or list. Note that this only affects the return value; the original object x is not modified.

i1 : x = RObject toList(5..15)

--error or time limit reached in conversion of output to net: type 'debugError()' to run it again; will try conversion to string

o1 = 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15

o1 : RObject of type integer
i2 : x_1 = 3

--error or time limit reached in conversion of output to net: type 'debugError()' to run it again; will try conversion to string

o2 = 3, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15

o2 : RObject of type integer
i3 : x

--error or time limit reached in conversion of output to net: type 'debugError()' to run it again; will try conversion to string

o3 = 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15

o3 : RObject of type integer

See also

Ways to use this method:


The source of this document is in RInterface/doc/extract.m2:51:0.