[Rd] Reading a Fixed-Width File with SAS import instructions directly into an R data frame

From: Anthony Damico <ajdamico_at_gmail.com>
Date: Sat, 04 Feb 2012 16:22:46 -0500


Hi everyone,

I'm wondering if anyone has written (or knows of) an R function that takes the SAS import code to read in an ASCII / fixed-width data file.. and then parses out the SAS code to figure out how to structure a (foreign package) read.fwf command so that fixed-width data file can be read directly into an R data frame?

I'm envisioning a function that returns an R data frame from ASCII data set, using two parameters: the location of the ASCII data and the location of the SAS import code.

I have done some work on the topic (https://gist.github.com/1253937), but it's got a lot of bugs. Before I spend a bunch of time cleaning this up, I wanted to check that I'm not re-inventing the wheel.

Any leads on related (and probably much further along) work would be appreciated.

Thanks!!

Anthony Damico
Kaiser Family Foundation

        [[alternative HTML version deleted]]



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Sat 04 Feb 2012 - 21:30:53 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 06 Feb 2012 - 10:00:13 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive