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. Mary [[alternative HTML version deleted]]
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
Mary, My feeling is to tell other language read SAS data is like the pain on the A**. Instead, a solution I'd like to use is to use some lightweight DB to do the data transfer. For instance, SAS shouldn't have no problem to libname to a sqlite DB using ODBC and then R is able to easily read sqlite data. wensui On 10/8/07, Mary Royerr <mroyerr at gmail.com> 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. > > Mary > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- ==============================WenSui Liu Statistical Project Manager ChoicePoint Precision Marketing (http://spaces.msn.com/statcompute/blog)