> -----Original Message----- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of johannes rara > Sent: Tuesday, October 20, 2009 12:26 AM > To: r-help@r-project.org > Subject: [R] Problems importing Unix SAS .ssd04 file to R (Win) > > Hello, > > I'm trying to import a SAS file made using SAS on Unix. Currently I'm > using SAS on Windows and I'm trying to import that .ssd04 file to R. > The file name of the file is testfile.ssd04 and it is located in > 'M:\sasuser'. I'm using Windows XP and R 2.91. Basically what I'm > doing is > > ############ r code ############## > > library(foreign) > > sashome <- "C:/Program Files/SAS Institute/SAS/V8" > > folder_for_datafiles <- "M:/sasuser" > > read.ssd(folder_for_datafiles, "testfile", sascmd=file.path(sashome, > > "sas.exe")) > > SAS failed. SAS program at > C:\DOCUME~1\jrara\LOCALS~1\Temp\RtmpAAxO3X\file41bb5af1.sas > The log file will be file41bb5af1.log in the current directory > NULL > Warning message: > In read.ssd(folder_for_datafiles, "testfile", sascmd = file.path(sashome, : > SAS return code was 2 > > > ################################## > > This temporary SAS file 'file41bb5af1.sas' looks like this > > ############ sas code ############# > option validvarname = v6;libname src2rd 'M:/sasuser'; > libname rd xport > 'C:\DOCUME~1\jrara\LOCALS~1\Temp\RtmpAAxO3X\file6df11649'; > proc copy in=src2rd out=rd; > select testfile ; > ################################## > > Any ideas what I'm doing wrong? > > > > sessionInfo() > R version 2.9.1 (2009-06-26) > i386-pc-mingw32 > > locale: > LC_COLLATE=Finnish_Finland.1252;LC_CTYPE=Finnish_Finland.1252;LC_MON > ETARY=Finnish_Finland.1252;LC_NUMERIC=C;LC_TIME=Finnish_Finland.1252 > > attached base packages: > [1] graphics grDevices utils datasets grid stats > methods base > > other attached packages: > [1] foreign_0.8-38 gregmisc_2.1.1 gplots_2.7.1 caTools_1.9 > bitops_1.0-4.1 gtools_2.6.1 gmodels_2.15.0 gdata_2.6.1 > > loaded via a namespace (and not attached): > [1] MASS_7.2-49 > > >
C can you read that dataset just using your Windows SAS v8? Dan Daniel J. Nordlund Washington State Department of Social and Health Services Planning, Performance, and Accountability Research and Data Analysis Division Olympia, WA 98504-5204 ______________________________________________ R-help@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.