[Rd] help text in read.table

Henrik Parn henrik.parn at bio.ntnu.no
Thu Sep 25 11:26:12 CEST 2008


Dear R-developers,

In read.table() the argument |colClasses = "NULL" can be used to skip 
columns and col.names to name the variables. The first time I tried to 
skip columns, I naively thought that /first/ the "NULL"-columns are 
skipped, /then/ you name only the remaining columns actually specified. 
Therefore, I did not provide names (i.e. "NULL") for the (large) number 
of columns skipped. When I got the warning message, "Error in 
read.table(file = file, header = header, sep = sep, quote = quote,  : 
more columns than column names", I realized that I have to provide 
col.names also for the columns skipped. Now I wonder if it might be an 
idea to add a sentence in the help text for colnames (and maybe for 
colClasses) that you need to provide colnames = "NULL", for variables 
with colClasses = "NULL". Well, just a thought.

I take the opportunity to thank you all for your excellent work with R!


Best regards,

Henrik  

|

-- 
Henrik Pärn
Centre for Conservation Biology
Department of Biology
Norwegian University of Science and Technology
NO-7491 Trondheim
Norway

Office: +47 73596285
Fax: +47 73596100
Mobile: +47 90989255

E-mail: henrik.parn at bio.ntnu.no



More information about the R-devel mailing list