[Rd] suggestion for read.table

From: Benjamin Tyner <btyner_at_gmail.com>
Date: Thu, 20 Sep 2007 17:04:53 -0400


R-devel,

IMHO, in readtable.R, the scan command

if (nlines > 1)

            for (i in seq_along(col))
                col[i] <- length(scan(file, what = "", sep = sep,
                                      quote = quote,
                                      nlines = 1, quiet = TRUE, skip = 0,
                                      strip.white = strip.white,
                                      blank.lines.skip = blank.lines.skip,
                                      comment.char = comment.char,
                                      allowEscapes = allowEscapes))
        cols <- max(col1, col)


should have fill = fill added. Otherwise, when fill = TRUE, it is possible for the warning

warning("header and 'col.names' are of different lengths")

to be inadvertantly triggered further down.

Ben



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Thu 20 Sep 2007 - 21:07:41 GMT

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 Fri 21 Sep 2007 - 02:42:17 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.