- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@Visiting wrote:
It is close to get it work, thank you!
But I got an error: "The RLANG system option must be specified in the SAS configuration file or on the SAS invocation command line to enable the submission of R language statements".
How can I solve this issue?
Suggest you read the info under the links provided. For example under the one already shared earlier it clearly states:
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you remind me! I noticed that, but I use SAS EG, it is in cloud server, R is not installed there, probably that is why sample code doesn't work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
In that case the administrator of your SAS cloud platform needs to add the RLANG option. This is not something you can do.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
https://communities.sas.com/t5/SAS-Data-Management/How-to-RUN-R-or-Python-in-SAS/m-p/330170
https://communities.sas.com/t5/SAS-Communities-Library/The-Open-Source-Integration-node-installation...
https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/How-can-I-run-R-code-in-SAS-OnDemand-for-...
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
SAS supports importing dataframes. So instead of using write.RData(), just import the dataframe directly:
proc iml;
submit / R;
library(datasets)
test<- mtcars
endsubmit;
call ImportDataSetFromR("MySASData", "test");
quit;
proc print data=MySASData; run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@Rick_SAS wrote:
SAS supports importing dataframes. So instead of using write.RData(), just import the dataframe directly:
proc iml; submit / R; library(datasets) test<- mtcars endsubmit; call ImportDataSetFromR("MySASData", "test"); quit; proc print data=MySASData; run;
The requestor said they already have a disk file (Rdata file). Is that the same thing as a data frame? Or could it contain some other type of R object? If what was saved in the Rdata file is not a data frame can you still use that same call routine? Or would they first need to run some R code to convert the object into a dataframe?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
RData files can store multiple R objects. But SAS can import only data frames, which are rectangular and are analogous to SAS data sets. This is documented at
SAS Help Center: IMPORTDATASETFROMR Call
and
SAS Help Center: Transferring Data between SAS and R Software
- « Previous
-
- 1
- 2
- Next »