HI All, How to read SAS data directly into R ? Thank you [[alternative HTML version deleted]]
maybe package foreign - all though I don't have any experience with this. On Tue, Aug 31, 2010 at 12:25 PM, choonhong ang <angie.bearman at gmail.com> wrote:> HI All, > > How to read SAS data directly into R ? > > Thank you > > ? ? ? ?[[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. >-- Stephen Sefick ____________________________________ | Auburn University? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?? | | Department of Biological Sciences? ? ? ? ?? | | 331 Funchess Hall? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? | | Auburn, Alabama? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?? | | 36849? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? | |___________________________________| | sas0025 at auburn.edu? ? ? ? ? ? ? ? ? ? ? ? ? ?? | | http://www.auburn.edu/~sas0025? ? ? ? ? ?? | |___________________________________| Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel like gods.? We are mammals, and have not exhausted the annoying little problems of being mammals. ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? -K. Mullis "A big computer, a complex algorithm and a long time does not equal science." ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? -Robert Gentleman
> -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of choonhong ang > Sent: Tuesday, August 31, 2010 10:25 AM > To: r-help at r-project.org > Subject: [R] help - read SAS into R > > HI All, > > How to read SAS data directly into R ? > > Thank you >You may or may not be able to depending on (1) what you mean by "directly," (2) whether the "SAS data" is in a proprietary SAS dataset format or in a portable transport format, and (3) whether you have SAS available to run. Depending on your answers to the above questions you have the options of using the foreign package, Harrell's Hmisc package, the RODBC package, and probably some others. So, tell us about your particular situation, data format, availability of SAS, OS, .... Dan Daniel J. Nordlund Washington State Department of Social and Health Services Planning, Performance, and Accountability Research and Data Analysis Division Olympia, WA 98504-5204
Looks like google has many suggestions. I use Hmisc package's sas.get function, but that requires that you actually have SAS installed. If you do have access to SAS, I've found that to be the easiest. choonhong ang wrote:> HI All, > > How to read SAS data directly into R ? > > Thank you > > [[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.
On Aug 31, 2010, at 1:25 PM, choonhong ang wrote:> HI All, > > How to read SAS data directly into R ?If the data is in the transport format, then foreign::read.xport has worked well for me. -- David Winsemius, MD West Hartford, CT
Apparently Analagous Threads
- vglm
- Insurance data in library(MASS)
- detect outliers and high levarage points
- comment on this book "A Handbook of Statistical Analyses Using R by Brian S. Everitt (Author), Torsten Hothorn (Author)"
- subset based on column names and then subset based on the inverse (grep?, or...)