[R] read.table(..., header == FALSE, colClasses = <vector with names attribute>)

Benjamin Tyner btyner at gmail.com
Mon Oct 23 23:53:21 CEST 2017


I noticed that starting with R version 3.3.0 onward, this generates a 

    > txt <- c("a", "3.14")
    > read.table(file = textConnection(txt), header = FALSE, colClasses 
= c(x = "character", y = "numeric"))

the warning is "not all columns named in 'colClasses' exist" and I guess 
the change was made in response to this?


Regardless, I am wondering whether this is desirable, that as a result 
of the change, the code has become stricter about the presence of a 
(formerly) harmless names attribute. Or am I missing something?



More information about the R-help mailing list