Re: [R] read.xport

From: Peter Dalgaard <p.dalgaard_at_biostat.ku.dk>
Date: Fri 15 Jul 2005 - 08:21:41 EST

Peter Dalgaard <p.dalgaard@biostat.ku.dk> writes:

> Frank E Harrell Jr <f.harrell@vanderbilt.edu> writes:
>
> > Nelson, Gary (FWE) wrote:
> > > I have the latest version of foreign, but it still doesn't work. I
> > > quickly tried the Hmisc package, but the same issue arose. I will delve
> > > into the Hmisc package further.
> >
> > This is disappointing as we rely on read.xport quite a bit.
>
> Indeed. Can SAS read everyhting in the XPORT lib? If so, what can we
> do to figure out what goes wrong in read.xport. Can you paraphrase the
> situation using simulated data and put the file somewhere?

Lines crossed... Gary anwered the last bits already, and I can confirm both that SAS will read all 24 elements, whereas lookup.xport leaves off 7 of them - in the middle. Specifically:

> names(lookup.xport("int82ag.xpt"))

 [1] "I1_821"  "I1_822"  "I1_823" "I1_824"  "I1_825"  "I1_826"   "I2_821"
 [8] "I2_822"  "I2_823"  "I2_824"  "I2_825" "I2_826"  "GP4_822"  "GP4_823"
[15] "GP4_824" "GP4_825" "GP4_826"

whereas PROC CONTENTS shows

> grep 'Data Set Name' readxport.lst | awk '{print $4}'

FOO.I1_821
FOO.I1_822
FOO.I1_823
FOO.I1_824
FOO.I1_825
FOO.I1_826
FOO.I2_821
FOO.I2_822
FOO.I2_823
FOO.I2_824
FOO.I2_825
FOO.I2_826
FOO.I3_821
FOO.I3_822
FOO.I3_823
FOO.I3_824
FOO.I3_825
FOO.I3_826
FOO.GP4_821
FOO.GP4_822
FOO.GP4_823
FOO.GP4_824
FOO.GP4_825
FOO.GP4_826

Notice that all the I3's and GP4_821 has gone AWOL in lookup.xport

-- 
   O__  ---- Peter Dalgaard             ุster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)                  FAX: (+45) 35327907

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Fri Jul 15 08:28:50 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:43 EST