Skip to content

Support the passing of objects returned by eval() straight to set() #33

@Kevin-Jin

Description

@Kevin-Jin

Rserve.create().eval() accepts a callback function with signature (error, robj). Rserve.create().set() should be able to accept such a robj (without any transformations) so that set() effectively is the complement to eval(). This would enable applications to pass objects that require attributes, such as data frames and matrices, to R by constructing a valid SEXP robj.

set() should also accept all results of robj.json() as well, although the result in R may not be exactly the same as the what is generated by eval(). E.g. because of the type ambiguity of arrays that are all NA, set('x', eval(as.numeric(NA))) will save a logical vector to 'x'.

I'm working on a pull request for this now but I won't submit it until pull request #32 is either accepted or denied because there could be a lot of conflicts depending on the outcome.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions