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]]
Do you have the foreign package loaded? -- David
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 th...{{dropped:6}}
You need to load the foreign package first. library(foreign) ----- Original Message ----- From: "b g" <shakespeare_1040 at hotmail.com> To: <r-help at r-project.org> Sent: Monday, November 10, 2008 12:28 PM 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]] --------------------------------------------------------------------------------> ______________________________________________ > 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. >