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

RObject SPACE Array = Thing -- replace multiple elements of an R object

Description

Replace multiple elements 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)

o1 =  [1]  5  6  7  8  9 10 11 12 13 14 15

o1 : RObject of type integer
i2 : x[1..4, 8] = {1, 2, 3, 4, 5}

o2 =  [1]  1  2  3  4  9 10 11  5 13 14 15

o2 : RObject of type integer
i3 : x

o3 =  [1]  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 /build/reproducible-path/macaulay2-1.26.05+ds/M2/Macaulay2/packages/RInterface/doc/extract.m2:102:0.