[R] Working around 256 byte variable names? + trouble opening large file
Erik Iverson
eiverson at NMDP.ORG
Mon Sep 21 22:25:55 CEST 2009
> I did just try to do that, and it is still returning the same error when I
> try to attach the csv file..
>
> > vc1<-read.table("P:\\R\\Everything-I.csv",header=T, sep=" ", dec=".",
> na.strings=NA, strip.white=T)
> > attach(vc1)
> Error in attach(vc1) : variable names are limited to 256 bytes
>
> Each variable name is only 5 to 6 characters long, but I'm sure you're
> right about R reading the entire header line as one variable.
> I cannot figure out though, how to stop it from doing so.
>
> sep=" ", or sep="," do not seem to work either, though I don't know if it
> is the right thing to be trying.
>
You will certainly need to specify the correct "sep" argument, and if it is truly a CSV file, that is NOT " ", but "," Why don't you paste/attach the first few lines of your .csv file for inspection if all else fails? What about the unmatched quote idea from a previous post??
More information about the R-help
mailing list