Skip to content
Prev 26491 / 398502 Next

Part II Re: [R] read.ssd {foreign} (Reading a permanent SAS dataset into an R data frame)

Hello,

I adopted the suggestion to use the R command
before the
read.ssd("J:\\QM\\Reports\\Sarthur\\SAS_Application\\SAS_Data_Sets","use")

statement (notice, I am at work now, so the directory
structure changes).  Do I need any of the other
read.ssd parameters to get this statement to work,
because...

... I get the following error message in R: 

"
SAS failed.  SAS program at
C:\TEMP\Rtmp12421\file21582.sas 
a log and other error products should be in the
vicinity
NULL
Warning messages: 
1: sas not found 
2: SAS return code was -1 in:
read.ssd("J:\\QM\\Reports\\Sarthur\\SAS_Application\\SAS_Data_Sets",
"

Why am I getting the message "sas not found", when I
have SAS installed on my machine?

I checked the PROC COPY SAS program generated in the
indicated temporary file:

"
libname src2rd
'J:\QM\Reports\Sarthur\SAS_Application\SAS_Data_Sets';
libname rd xport 'C:\TEMP\Rtmp12421\file14817';
proc copy in=src2rd out=rd;
select use ;
"

SAS log

"
NOTE: SAS initialization used:
      real time           4.64 seconds
      cpu time            0.73 seconds
"

Can anyone help me get to the next step of this
process?  I believe I am close to getting R to read
SAS permanent data sets directly, which I would really
like to be able to do.

Thanks,

Stephen
--- ripley at stats.ox.ac.uk wrote: