[R] read sas data into R

Peter Dalgaard p.dalgaard at biostat.ku.dk
Tue Oct 9 08:26:01 CEST 2007


Mary Royerr wrote:
> Hi
>
> I am having trouble using read.ssd. Can someone help?
>
> The code that I have written is
>
> *sashome<-"C:/Mary/Datasets"*
> *read.ssd(read.ssd(file.path(sashome, "core", "sashelp"), "surv_1v",*
> *sascmd = file.path(sashome, "sas.exe"))*
>
> Here the path that I have given is correct, where the dataset
> surv_1v.sas7bdat is kept. The message that R gives me is this:
>
> *SAS failed.  SAS program at
> C:\DOCUME~1\Royerm02\LOCALS~1\Temp\Rtmpdi2Osb\file4ff053f7.sas
> The log file will be file4ff053f7.log in the current directory
> NULL
> Warning messages:
> 1: "C:/Mary/Datasets /sas.exe" not found in: system(paste(sascmd, tmpProg))
> 2: SAS return code was -1 in: read.ssd(file.path("C:/Mary/Datasets",
>   
> *
> what do I do? The help for read.ssd does not help either. So any help will
> be greatly appreciated.
>
>   
You need to get "sascmd" to contain the full path to your SAS 
executable.  Currently, it is not finding it in C:/Mary/Datasets 
/sas.exe (what's up with the extra space?). More likely it is somewhere 
under C:/Program Files/....


-- 
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907



More information about the R-help mailing list