[R] read SAS file
iverson at biostat.wisc.edu
Mon Nov 10 20:24:33 CET 2008
What is the working directory, getwd() ?
That's where R will look. give read.xport the full path to your file?
YOu might also look at sas.get from the Hmisc package.
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?
>> From: Patrick.Richardson at vai.org> To: shakespeare_1040 at hotmail.com; r-help at r-project.org> Date: Mon, 10 Nov 2008 13:41:37 -0500> Subject: RE: [R] read SAS file> > Did you load the "foreign" library first?> > Try:> > library(foreign)> read.xport("cft2008R")> > HTH,> > Patrick> > > -----Original Message-----> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of b g> Sent: Monday, November 10, 2008 1:29 PM> To: r-help at r-project.org> Subject: [R] read SAS file> > > Looked at a lot of documentation and listserv postings and still can't solve this problem. I need to get a SAS dataset into R. I've converted it to an .xpt file and when I try to read it I get:> > > read.xport("cft2008R")> Error: could not find function "read.xport"> >> > Not sure what I'm doing wrong. I'm running SAS 9.1.3 on an UNIX box. I ftp'd the file over to my C:\Program Files\R\R-2.8.0\ directory on my local machine running WinXP. Suggestions appreciated.> ___________________
> ______________________________________________> > l.> > ty_112008> [[alternative HTML version deleted]]> > This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient(s) please contact the sender by reply email and destroy all copies of the original message. Thank you.
> of your life
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help