Hi,

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?

#######
R stuff:

> read.table("myfile.CSV", sep = "\t", header = T)
  Error in read.table("myfile.CSV", sep = "\t",  :
  more columns than column names

> count.fields("myfile.CSV", sep = "\t")
   [1] 10 12 12 12 12 12 12 12 12 12 12 [...]

#######
ugly sample ("Exported by SDL DataTable component"):

time/ms C550.KMS Cyt_b559.KMS Cyt_b563.KMS Cyt_f_.KMS P515FR.KMS Scatt.KMS Zea2.KMS PC P700 0 Point1 -599.500 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0 Point2 -598.000 -0.012 -0.013 0.040 0.013 0.027 0.010 0.022 0.000 0.000 0 Point3 -596.500 -0.015 -0.015 0.044 0.020 0.025 0.010 0.033 0.000 0.000
[...]


Cheers,
Martin

______________________________________________
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.

Reply via email to