[R] R and SAS

Janne Pitkäniemi Janne.Pitkaniemi at ktl.fi
Fri Jun 1 11:06:47 CEST 2001


Thank you for the comments. It turned out that I can use SAS 8.1 for VAX/VMS and  set these lines to create XPORT file

    LIBNAME a v8 '';
    libname b XPORT '';

     PROC COPY IN=a OUT=b;

     RUN;

and the first lines of the file looked very different indeed. Any comments ?
Does updated version of SAS produce different transport file ?
I'm sure read.xport does not read this file.

Janne







Douglas Bates wrote:

> 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;
> >
> >      RUN;
> >
> >    and I succeed in getting file that looks like correct xport
> > file.However
> >    when typing in R following lines
> >
> >   read.xport("htpa2000.txt")
> >
> >   I get message
> >
> >  Error in lookup.xport(file) : SAS transfer file has incorrect library
> > header
> >
> >  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
> 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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Janne.Pitkaniemi.vcf
Type: text/x-vcard
Size: 401 bytes
Desc: Card for Janne =?iso-8859-1?Q?Pitk=E4niemi?=
Url : https://stat.ethz.ch/pipermail/r-help/attachments/20010601/200c0eb7/Janne.Pitkaniemi.vcf


More information about the R-help mailing list