Pfaff, Bernhard
2002-Dec-20 17:39 UTC
Part II Re: [R] read.ssd {foreign} (Reading a permanent SAS d ataset into an R data frame)
try: library(foreign) read.ssd("J:\\QM\\Reports\\Sarthur\\SAS_Application\\SAS_Data_Sets","use") instead, hth, Merry Christmas, Bernhard -----Original Message----- From: Stephen Arthur [mailto:sarthur67 at yahoo.com] Sent: 20 December 2002 16:55 To: ripley at stats.ox.ac.uk; rossini at blindglobe.net Cc: r-help at stat.math.ethz.ch; stvjc at channing.harvard.edu Subject: Part II Re: [R] read.ssd {foreign} (Reading a permanent SAS dataset into an R data frame) Hello, I adopted the suggestion to use the R command> foreignbefore the>read.ssd("J:\\QM\\Reports\\Sarthur\\SAS_Application\\SAS_Data_Sets","use") statement (notice, I am at work now, so the directory structure changes). Do I need any of the other read.ssd parameters to get this statement to work, because... ... I get the following error message in R: " SAS failed. SAS program at C:\TEMP\Rtmp12421\file21582.sas a log and other error products should be in the vicinity NULL Warning messages: 1: sas not found 2: SAS return code was -1 in: read.ssd("J:\\QM\\Reports\\Sarthur\\SAS_Application\\SAS_Data_Sets",>" Why am I getting the message "sas not found", when I have SAS installed on my machine? I checked the PROC COPY SAS program generated in the indicated temporary file: " libname src2rd 'J:\QM\Reports\Sarthur\SAS_Application\SAS_Data_Sets'; libname rd xport 'C:\TEMP\Rtmp12421\file14817'; proc copy in=src2rd out=rd; select use ; " SAS log " NOTE: SAS initialization used: real time 4.64 seconds cpu time 0.73 seconds " Can anyone help me get to the next step of this process? I believe I am close to getting R to read SAS permanent data sets directly, which I would really like to be able to do. Thanks, Stephen --- ripley at stats.ox.ac.uk wrote:> On Thu, 19 Dec 2002, Stephen Arthur wrote: > > > I just downloaded and installed R 1.6.1 on my > Windows > > machine where I also run SAS. > > > > I want to use the 'read.ssd' function so that I > can > > convert a permanent SAS data set into an R data > frame. > >> > C:\Program > > Files\R\rw1061\library\foreign\html\read.ssd.html > > > > When I run the first R command, in the example, on > my > > SAS library: > > > > > list.files("C:\\My Documents\\SAS_Data_Sets") > > > > I get the correct output. > > > > When I run the second R command, in the example, > > > > > read.ssd("C:\\My > Documents\\SAS_Data_Sets","use") > >> 2) To use a package you need to use e.g. > > library(foreign)______________________________________________ R-help at stat.math.ethz.ch mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help ---------------------------------------------------------------------- If you have received this e-mail in error or wish to read our e-mail disclaimer statement and monitoring policy, please refer to http://www.drkw.com/disc/email/ or contact the sender. ----------------------------------------------------------------------
Stephen Arthur
2002-Dec-20 17:55 UTC
Part II Re: [R] read.ssd {foreign} (Reading a permanent SAS d ataset into an R data frame)
Thanks> library(foreign)I did do that originally, I just mis-tpyed it, and it did not work. I talked with people at SAS, and they said the PROC COPY SAS code was good, but that I just need to play around with the R parameters for read.ssd Will get back to you on this issue. If you have any additional suggestions, please send them. --- "Pfaff, Bernhard" <Bernhard.Pfaff at drkw.com> wrote:> try: > > library(foreign) >read.ssd("J:\\QM\\Reports\\Sarthur\\SAS_Application\\SAS_Data_Sets","use")>
Thomas Lumley
2002-Dec-20 19:10 UTC
Part II Re: [R] read.ssd {foreign} (Reading a permanent SAS d ataset into an R data frame)
On Fri, 20 Dec 2002, Stephen Arthur wrote:> Thanks > > > library(foreign) > > I did do that originally, I just mis-tpyed it, and it > did not work. > > I talked with people at SAS, and they said the PROC > COPY SAS code was good, but that I just need to play > around with the R parameters for read.ssd >If the SAS code is good then just using it in SAS seems like a useful workaround. -thomas
Apparently Analagous Threads
- Part II Re: read.ssd {foreign} (Reading a permanent SAS d ataset into an R data frame)
- Part II Re: read.ssd {foreign} (Reading a permanent SAS d ataset into an R data frame)
- Part II Re: read.ssd {foreign} (Reading a permanent SAS d ataset into an R data frame)
- read.ssd {foreign} (Reading a permanent SAS dataset into an R data frame)
- reading SAS data files