Hi!

I need to import in R some SAS dataset (sas7bdat). I found two functions to
do it:
"read.ssd" from the package "foreign" and "sas.get" from "Hmisc".

df = read.ssd(libname = path2data, sectionnames = "sasSmallDataset",
tmpXport = path2data, tmpProgLoc = path2data, sascmd = path2sas)
sas.get(libraryName = path2data, member = "sasSmallDataset", formats =
FALSE, sasprog = path2sas, keep.log = TRUE)

where path2data is the directory on which is contained the file sas,
sasSmallDataset.sas7bdat are the data and path2sas is the path to SAS
(C:/Programmi/SAS/SAS System/9.0/sas.exe).

I obtain the following messages:

from read.ssd:
SAS failed.  SAS program at Z:/projects/QUANTIDE/import2R/.sas
The log file will be import2R.log in the current directory
Warning messages:
1: In file.symlink(oldPath, linkPath) :
  symlinks are not supported on this platform
2: In read.ssd(libname = path2data, sectionnames = "sasSmallDataset",  :
  SAS return code was 2

from sas.get:
Error in if (status != 0) { : argument is of length zero

I have SAS 9.0 and R 2.10.1 running on Windows XP Pro.

Can you help me to found a solution or can you provide an alternative way to
import SAS data directly from R?

Thank you very much.

--
 Nicola Sturaro Sommacal
Quantide srl

http://www.quantide.com

        [[alternative HTML version deleted]]

______________________________________________
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.

Reply via email to