User Tools

Site Tools


lazynut_scripting_language:reference:r

R interfaces to lazyNut

Some key functionalities for lazyNut are implemented via an embedded R interpreter. The dataframe objects of lazyNut are stored in data.frame objects in R via the eN object (which is of S4 class eNdataframelist). Writing to these R objects is cached, though, due to the inefficiencies of row-wise extension of data.frames. The following are R commands, not lazyNut commands/methods.

eN["..."]

eN["foo"]

Returns the R data.frame object with the canonical object name foo in lazyNut. Parenthesised expressions that return a data.frame object are only effective in this construction if they are also the canonical name. Pretty names are not effective. The cache is flushed before returning the value.

eN["..."]<-

eN["foo"]<-data.frame(...)

Assignment is effective. A dataframe object (with no facets) will be created in the lazyNut object space, if necessary to maintain consistency. The cache is flushed both before and after the assignment, and the recently_modified status is set.

dataframes(eN)

dataframes(eN)

Returns a character vector of the names of available dataframes (without the eN[“”]). lazyNut anonymity is not respected, so more items could be returned than the equivalent list dataframe in lazyNut.

lazyNut_exec

lazyNut_exec("suject verb object")

The lazyNut interpreter runs the subject verb object command at the next nesting level. This command may not be one that results in a command equivalent to “R « *”, but commands that directly access R memory are okay. Most dataframe commands will work, except CSV and dataframe_merge functions; plotting will also not work.

lazynut_scripting_language/reference/r.txt · Last modified: 2016/03/25 13:12 (external edit)