You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
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.
The text was updated successfully, but these errors were encountered: