On Mon, Dec 7, 2009 at 5:37 PM, Marshall Feldman <ma...@uri.edu> wrote: > I totally agree with Barry, although it's sometimes convenient to include > data with analysis code for debugging and/or documentation purposes. > > However, the example actually applies equally to separate data files. In > fact, the example is from the U.S. Bureau of Labor Statistics at > ftp://ftp.bls.gov/pub/time.series/sm/, which contains nothing but data and > documentation files. At issue is not where the data come from, but rather > how to parse relatively complex data organized inconsistently. SAS has > built-in the ability to parse five different organizations of data: list > (delimited), modified list, column, formatted, and mixed (see > http://www.masil.org/sas/input.html). It seems R can parse such data, but > only with considerable work by the user. It would be great to have a > function/package that implements something with as easy (hah!) and flexible > as SAS.
I'd love to duplicate this functionality of SAS, however, I fear: http://www.sas.com/news/preleases/SASsuit.html but yes, some kind of declarative, template-driven data definition system might be useful. Such a thing may already exist, and be based on XML instead of what looks like line noise: INPUT #1 No 7.0 #2 name $CHAR15. / address $CHAR50. #4 phone $CHAR12.; Barry ______________________________________________ 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.