On Thu, 20 Oct 2005 [EMAIL PROTECTED] wrote: > Full_Name: Emmanuel Paradis > Version: 2.1.1 > OS: Linux > Submission from: (NULL) (193.49.41.105) > > > read.fwf(..., header = TRUE) does not work properly since: > > 1/ the original header is printed on the console and not in FILE; > 2/ the different 'parts' of the header should be separated with tabs > to work with the call to read.table. > > Here is a suggested fix for src/library/utils/R/read.fwf.R: > > 38c38,40 > < cat(FILE, headerline, "\n") > --- >> headerline <- unlist(strsplit(headerline, " {1,}")) >> headerline <- paste(headerline, collapse = "\t") >> cat(file = FILE, headerline, "\n")
Thanks, but I don't think that is right. It assumes the header line is space-delimited (or at least that spaces get converted to tabs). We have not specified the format of the header line, and it cannot usefully be fixed format. So I think we need to specify it is delimited by 'sep' (not tab). -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel