[R] help reading a variably formatted text file

Ott Toomet otoomet at econ.dk
Wed Nov 20 10:19:50 CET 2002


Hi,

 | Date: Tue, 19 Nov 2002 11:11:41 -0700
 | From: Corey Moffet <cmoffet at nwrc.ars.usda.gov>
 | 
 | I have a generated file that looks like the following:
 | 
 | ----- Begin file -----
 |  #
 |  #       Output File
 |  #
 |  float   Version      2002.700000000000

As I understand, you have generated the file yourself using a
different software.  In that case I strongly recommend to consider
using XML as the format of the data file.  It allows much more
flexible parsing and the changes in reading routines are simple if you
change the format of data.  Many programs have pre-programmed XML
parsers, among them R (package XML) and perl.  I have used XML with
success while transfering complicated estimation results from SAS and
GAUSS to R.

Just a suggestion.

Ott
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list