Macaulay2 » Documentation
Packages » RInterface » RContext » new RContext from String
next | previous | forward | backward | up | index | toc

new RContext from String -- construct an R context

Description

Pass an R code string to initialize the context with variable bindings:

i1 : ctx = RContext "x <- 5L; y <- x^2L"

o1 = ctx

o1 : RContext
i2 : ctx_"x"

o2 = [1] 5

o2 : RObject of type integer
i3 : ctx_"y"

o3 = [1] 25

o3 : RObject of type double

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/context.m2:48:0.