Hi, I have a need to process (in real-time) a large number of .sas7bdat files from within R. The problem is I don't want to convert these files to .xpt (transport) every time. So just checking if anyone has a (viable) way to read .sas7bdat files directly into R? Thank You. //---------------------------------- // Alex Bryant // Software Developer // Integrated Clinical systems // 908-996-7208 ________________________________ Confidentiality Note: This e-mail, and any attachment to...{{dropped:13}}
Hi Alex, Perhaps the read.ssd function in the foreign package might do what you want. See [1] for details. HTH, Jorge [1] http://cran.r-project.org/web/packages/foreign/index.html <http://cran.r-project.org/web/packages/foreign/index.html> On Thu, Feb 4, 2010 at 5:31 PM, Alex Bryant <> wrote:> Hi, I have a need to process (in real-time) a large number of .sas7bdat > files from within R. The problem is I don't want to convert these files to > .xpt (transport) every time. So just checking if anyone has a (viable) way > to read .sas7bdat files directly into R? > > Thank You. > > //---------------------------------- > // Alex Bryant > // Software Developer > // Integrated Clinical systems > // 908-996-7208 > > > ________________________________ > Confidentiality Note: This e-mail, and any attachment to...{{dropped:13}} > > ______________________________________________ > R-help@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. >[[alternative HTML version deleted]]
Alex Bryant wrote:> Hi, I have a need to process (in real-time) a large number of .sas7bdat files from within R. The problem is I don't want to convert these files to .xpt (transport) every time. So just checking if anyone has a (viable) way to read .sas7bdat files directly into R?SAS now advertises some sort of R support (see http://support.sas.com/rnd/app/studio/Rinterface2.html), so maybe you could get SAS to convert them to a native R format. I think you won't find a way for R to read a SAS proprietary format. Duncan Murdoch
On Feb 4, 2010, at 5:31 PM, Alex Bryant wrote:> Hi, I have a need to process (in real-time) a large number > of .sas7bdat files from within R. The problem is I don't want to > convert these files to .xpt (transport) every time. So just > checking if anyone has a (viable) way to read .sas7bdat files > directly into R?I believe (on the basis of what is written on the NCHS/NHANESwebsite) that if you are a Windows user, which I am only under duress, you can get at such data with a free product that SAS makes available: http://www.sas.com/apps/demosdownloads/sassysview_PROD_8.2_sysdep.jsp?packageID=000176 Whether that product can be called as a system() executable with arguments, I have no idea. -- David Winsemius, MD Heritage Laboratories West Hartford, CT
Hi Alex, 'm not an R user but I found your question during a general Google search re: SAS7BDAT files. You might like to try my free 'dsread' utility which will convert most Windows-format SAS7BDAT files to CSV. It's command-line based so can easily be called from other code with relevant parameters. I'd be keen to hear any feedback on this utility from you and other R users (I'm a SAS guy myself). Cheers, Chris. -- View this message in context: http://n4.nabble.com/Reading-sas7bdat-files-directly-tp1469515p1567222.html Sent from the R help mailing list archive at Nabble.com.
I suppose a link would have added usefulness: http://www.oview.co.uk/dsread Chris. -- View this message in context: http://n4.nabble.com/Reading-sas7bdat-files-directly-tp1469515p1567256.html Sent from the R help mailing list archive at Nabble.com.