[R] read SAS file

b g shakespeare_1040 at hotmail.com
Tue Nov 11 14:54:12 CET 2008


Ok.  I can see everything now.  Thanks to everyone for the help.  Sending this as text to try to solve the line wrap problem.  This is my hotmail account so I don't know if this will work.

> Date: Tue, 11 Nov 2008 14:41:57 +0100
> From: P.Dalgaard at biostat.ku.dk
> To: shakespeare_1040 at hotmail.com
> CC: patrick.richardson at vai.org; r-help at r-project.org
> Subject: Re: [R] read SAS file
> 
> b g wrote:
>> Figured out the problem reading the file. Csv files must be ftp'd as ascii and xpt files as binary. However, both strategies result in the first few columns being omitted. I'd like to check which variables are on the file, much like proc contents in SAS, but I can't find the command to do this in the documentation. How is this done?> Date: Tue, 11 Nov 2008 10:35:28 +0100> From: P.Dalgaard at biostat.ku.dk> To: shakespeare_1040 at hotmail.com> CC: patrick.richardson at vai.org; r-help at r-project.org> Subject: Re: [R] read SAS file>> b g wrote:>> I must have this file in the wrong directory. I can see it and it's> spelled correctly in my command (including case) but I get:>>>>> library(foreign)> read.xport("cft2008R")>> Error in lookup.xport(file)>>> :> unable to open file: 'No such file or directory'> There are several> subdirectories under C:\Program Files\R\R-2.8.0\ . Should it be in one> of those?>> If it is a .xpt file, then you likely need "cft2008R.xpt".>> --> 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 at biostat.ku.dk) FAX: (+45) 35327907> 
>> _________________________________________________________________
>> See how Windows® connects the people, information, and fun that are part of your life
>> http://clk.atdmt.com/MRT/go/119463819/direct/01/
> 
> (please see if you can do something about the lack of line wrap.....)
> 
> Did you try 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 at biostat.ku.dk) FAX: (+45) 35327907
> 
_________________________________________________________________

 Live



More information about the R-help mailing list