From svetlana.eden at vanderbilt.edu  Fri Mar 26 22:44:33 2004
From: svetlana.eden at vanderbilt.edu (svetlana.eden@vanderbilt.edu)
Date: Fri Mar 26 22:44:37 2004
Subject: [Rd] lookup.xport in foreign ignoring some datasets (PR#6701)
Message-ID: <20040326214433.3D2A010438@slim.kubism.ku.dk>



The Details.

In the following version.
> version
         _
platform i386-pc-linux-gnu
arch     i386
os       linux-gnu
system   i386, linux-gnu
status
major    1
minor    8.1
year     2003
month    11
day      21
language R
>

lookup.xport ignores some datasets in sas export file.

File "emptySasData3.xpt"
(available at http://biostat.mc.vanderbilt.edu/tmp/emptySasData3.xpt)
is a recreation of sensitive data.
It was generated in SAS as an export file containing 51 empty datasets,
but it has a structure of the non-empty data that revealed the problem
(and can not be shared).
It means that lookup.xport ignores non-empty datasets also.

The file "emptySasData3.xpt" has 51 empty datasets.
lookup.xport reads only 37 first datasets.
(In non-empty data lookup.xport ignored
datasets in the middle (not in the end) )
 
 > look <- lookup.xport("emptySasData3.xpt")
 > names(look)
  [1] "AE"   "BII"  "BIO"  "BLI"  "BP"   "C"    "D"    "DEA"  "DEM" 
 "DHT"
 [11] "DIS"  "DP"   "E"    "EC"   "EL"   "G"    "HS"   "HU"   "IN"  
"IP"
 [21] "L"    "LT"   "MC"   "MO"   "NO"   "PAS"  "PAT"  "PATH" "PO"  
"PR"
 [31] "PS"   "PV"   "Q"    "RA"   "RE"   "SA"   "SL"

The following datasets were not read by lookup.xport
UR, URN, VIS, VIT, VO.


The example of the
SAS code used to builds the empty data
from the non-empty data in "export.xpt".

options nofmterr;
proc options;run;
libname x sasv5xpt "H:\projects\export.xpt";
libname y sasv5xpt "H:\projects\emptySasData3.xpt";
data ae; set x.ae(obs = 0); run;
...
data vit; set x.vital(obs = 0); run;
data vo; set x.volume(obs = 0); run;
proc copy in = work out = y; run;


I think I did not miss anything,
thank you,

Svetlana


-- 
Svetlana Eden        Biostatistician II            School of Medicine
                     Department of Biostatistics   Vanderbilt University


[Rd] lookup.xport in foreign ignoring some datasets (PR#6701)
svetlana.eden@vanderbilt.edu