- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I am interested to run some R code in sas 9.4.
I recently leant for this paper(
https://www.jstatsoft.org/article/view/v046c02)
but the provided Proc R looks to be an old version.
Although, I was able to run, I couldn't generate R plots in sas results.,
I would like to ask if another updated version of this Proc R exists?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Afaik there is no proc r in sas right know, with recent releases you can use proc iml to execute r code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I had never heard about PROC R.
It is probably a 3rd party procedure, to be installed on top of regular SAS, but NOT supported by SAS.
You can find a lot on internet about running R functions and R programs from within PROC IML (Interactive Matrix Language).
See for example here :
PhUSE 2011
Paper CS07
Calling R Functions from SAS
Dr. Peter Bewerunge, HMS Analytical Software, Heidelberg, Germany
https://www.lexjansen.com/phuse/2011/cs/CS07.pdf
It is also in the SAS DOC of course ( the below doc is from IML Studio ) :
SAS® 9.4 and SAS® Viya® 3.5 Programming Documentation | SAS 9.4 / Viya 3.5
SAS/IML Studio for SAS/STAT Users
Calling Functions in the R Language
https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/imlsstat/imlsstat_statr_toc.htm
SAS has a PROC PYTHON, but no PROC R 😉 .
Koen
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
This isnt' a procedure but a SAS macro that runs the R analyses in the R program to redirect the results to SAS.
Also the data is transferred with proc import/export between the environments.
The paper and the macro are 10 years old (!) but the procedures used in SAS are still available with no significant update (if any) so I'm not sure what kind of update you expect?
- Cheers -
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
But I can output the R plot in a folder and then use "proc document" to combine them later. you can check the link here: https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/odsgs/n0e8nrja6xauljn1es9oq5lk1kal.htm