on 08/22/2008 10:19 AM Martin Ballaschk said the following:
how do I read files that have two header fields less than they have
columns? The easiest solution would be to insert one or two additional
header fields, but I have a lot of files and that would be quite a lot
of awful work.
Any ideas on how to solve that problem?
you could use read.table with "header = F", that way it will read the
table without worrying about column names (they will end up in the first
row of the data).
Then, you can just delete the first row, or assign it to names(), or
whatever.
if all the columns in all your files have the same names, you can read
them all with header=F and col.names=vectorofcolumnnames, and then
delete first row (which will contain the incomplete col names from the
file).
hope this helps :)
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.