[R] Reading large SAS dataset in R
Phil Spector
spector at stat.berkeley.edu
Wed Jan 5 23:51:04 CET 2011
Santanu -
If you have sas installed on your computer, you may find using
the sas.get function of the Hmisc package useful.
If the only message that read.ssd produced was "Sas failed", it
would be difficult to figure out what went wrong. Usually the
location of the log file, which would explain the error more
thoroughly, is included in the error message.
- Phil Spector
Statistical Computing Facility
Department of Statistics
UC Berkeley
spector at stat.berkeley.edu
On Wed, 5 Jan 2011, Santanu Pramanik wrote:
> Hi all,
>
> I have a large (approx. 1 GB) SAS dataset (test.sas7bdat) located in the
> server (?R:/? directory). I have SAS 9.1 installed in my PC and I can read
> the SAS dataset in SAS, under a windows environment, after assigning libname
> in "R:\" directory.
>
>
>
> Now I am trying to read the SAS dataset in R (R 2.12.0) using the read.ssd
> function of the ?foreign? package, but I get an error message ?SAS failed?.
> I believe I have specified the paths correctly (after reading some previous
> posts I made sure that I do it right). Below is the small code:
>
>
>
> sashome<- "C:/Program Files/SAS/SAS 9.1"
>
> read.ssd(libname="R:/", sectionnames="test", sascmd=file.path(sashome,
> "sas.exe"))
>
>
>
> Please let me know where I am making the mistake. Is it because of the size
> of the file or the location of the file (in server instead of local hard
> drive)?
>
>
>
> Thanks in advance,
>
> Santanu
>
>
> --
> --------------------------------------------------------------------
> Santanu Pramanik
> Survey Statistician
> NORC at the University of Chicago
> Bethesda, MD
>
> [[alternative HTML version deleted]]
>
>
More information about the R-help
mailing list