Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Kevin-Jin opened this issue Apr 2, 2016 · 0 comments
Open

Comments

@Kevin-Jin
Copy link

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.

@Kevin-Jin Kevin-Jin changed the title Pass objects returned by eval() straight to set() Support the passing of objects returned by eval() straight to set() Apr 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant