[R] Read.xport function in package foreign

From: Nelson, Gary (FWE) <Gary.Nelson_at_state.ma.us>
Date: Mon, 25 Feb 2008 10:12:19 -0500

Hi All,

Sorry that I didn't provide enough information.

I've been trying to import SAS xport files that contain multiple files using package foreign's read.xport. I first attempted this back in 2005 and had problems. Some of files that were present in the SAS xport file weren't being created in R. I submitted my problem to the community: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/57864.html

and Dr. Dalgaard confirmed the issue:

>From what I've read, this problem was identified before 2005:

After updating to version 2.6.1 recently, I decided to try it again, but the problem still exists. I spent time trying to determine the issue but I don't understand the IEEE coding. I did discover that the data from the missing files are actually being included in one of the data frames but the data were read incorrectly. The XPORT files come from ftp://cusk.nmfs.noaa.gov/mrfss/intercept/ag/ if anyone wants to try it.
I used the .xpt in "int82ag.zip" (all years except 1985,1988 and 1989 are read incorrectly) and it appears they were created using SASV5XPT. Once imported, look in data frame I3_19822 which should have only 3650 records, but there are 76,187 records.

I am using version:

platform       i386-pc-mingw32             
arch           i386                        
os             mingw32                     
system         i386, mingw32               
major          2                           
minor          6.1                         
year           2007                        
month          11                          
day            26                          
svn rev        43537                       
language       R                           
version.string R version 2.6.1 (2007-11-26)

And package foreign is version 0.8-23.

I am wondering if anyone has created a fix that isn't available yet?

Gary Nelson.

R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon 25 Feb 2008 - 15:15:36 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 25 Feb 2008 - 15:30:16 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive