assigns the value of the Wolfram Language expression expr to a variable var in the R workspace, returning back the value of expr upon success and $Failed upon failure.
Details and Options
- Use RSet to send Wolfram Language expressions to R.
- The variable name var must be a string, but is not restricted to be the name of a valid R variable. It can actually be any piece of R code, which represents a legal lhs for the purposes of assignments in R (it is an L-value).
- The expression expr must be of the type convertible to R. Normally, you can use the ToRForm function to obtain an internal RLink representation for Wolfram Language expressions you want to send to R, and at the same time test whether or not your expression is legal.
- RSet works with both the short and long (internal) forms of the expression expr. The form of an expression that is returned is the same as the one used for expr.
Examplesopen allclose all
Basic Examples (5)
You can see that also by using ToRForm:
Wolfram Research (2012), RSet, Wolfram Language function, https://reference.wolfram.com/language/RLink/ref/RSet.html.
Wolfram Language. 2012. "RSet." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/RLink/ref/RSet.html.
Wolfram Language. (2012). RSet. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/RLink/ref/RSet.html