static DataObject CreateFromR( String sName, String sRExpr )
The return value is a reference to the newly created object of the DataObject class.
String sName
The name to assign to the DataObject.
String sRExpr
An R expression that is evaluated and then coerced to a data frame.
This method creates an object of the DataObject class from the result of evaluating an R expression. The method evaluates the R expression, coerces the result to an R data frame, and creates an object of the DataObject class from the variables of the R data frame.
The names of the variables in the DataObject are derived from the names of the variables in the R data frame. Because SAS has different variable naming rules from R, IMLPlus applies the following transformations to convert an R variable name to a valid SAS variable name:
For information about how IML Studio transfers data from R to IMLPlus, please refer to the topic Data Exchange Details.
/* The R package "datasets" contains the data set Titanic, which defines the data using the structure function. */ declare DataObject dobj; dobj = DataObject.CreateFromR( "R_Titanic_Dataset", "Titanic" ); DataTable.Create( dobj ).SetWindowPosition( 50, 0 );