EconPapers    
Economics at your fingertips  
 

%PROC_R: A SAS Macro that Enables Native R Programming in the Base SAS Environment

Xin Wei

Journal of Statistical Software, 2012, vol. 046, issue c02

Abstract: In this paper, we describe %PROC_R, a SAS macro that enables native R language to be embedded in and executed along with a SAS program in the base SAS environment under Windows OS. This macro executes a user-defined R code in batch mode by calling the unnamed pipe method within base SAS. The R textual and graphical output can be routed to the SAS output window and result viewer, respectively. Also, this macro automatically converts data between SAS datasets and R data frames such that the data and results from each statistical environment can be utilized by the other environment. The objective of this work is to leverage the strength of the R programming language within the SAS environment in a systematic manner. Moreover, this macro helps statistical programmers to learn a new statistical language while staying in a familiar environment.

Date: 2012-01-25
References: View complete reference list from CitEc
Citations: View citations in EconPapers (1)

Downloads: (external link)
https://www.jstatsoft.org/index.php/jss/article/view/v046c02/v46c02.pdf
https://www.jstatsoft.org/index.php/jss/article/do ... e/v046c02/Proc_R.sas
https://www.jstatsoft.org/index.php/jss/article/do ... 6c02-replication.zip

Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link: https://EconPapers.repec.org/RePEc:jss:jstsof:v:046:c02

DOI: 10.18637/jss.v046.c02

Access Statistics for this article

Journal of Statistical Software is currently edited by Bettina Grün, Edzer Pebesma and Achim Zeileis

More articles in Journal of Statistical Software from Foundation for Open Access Statistics
Bibliographic data for series maintained by Christopher F. Baum ().

 
Page updated 2025-03-19
Handle: RePEc:jss:jstsof:v:046:c02