[R] R and SAS
bates at stat.wisc.edu
Thu May 31 21:26:40 CEST 2001
Janne Pitkäniemi <Janne.Pitkaniemi at ktl.fi> writes:
> I'm trying to read SAS-data on VAX/VMS to Windows R using
> foreign pakage read.xport and experience some problems.
> Following lines are used in SAS to create XPORT file
> LIBNAME a ''xxx;
> LIBNAME b XPORT '';
> PROC COPY IN=a OUT=b;
> and I succeed in getting file that looks like correct xport
> when typing in R following lines
> I get message
> Error in lookup.xport(file) : SAS transfer file has incorrect library
> Does anyone has advice ? Is the problem in VAX/VMS SAS XPORT file ?
Can you send us the first 160 characters of the file? It is supposed to be
in text format (more or less) and should look something like
HEADER RECORD*******LIBRARY HEADER RECORD!!!!!!!000000000000000000000000000000 SAS SAS SASLIB 7.00 OSF1 10DEC99:15:56:30
It does not contain any carriage returns or line feeds.
This is what SAS claims in their documentation is the correct initial line
in the XPORT format. Hence this is what we check for.
What SAS actually creates is often different.
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
More information about the R-help