Dear R users,

I am trying to read in a file with 105 columns, and when trying to attach it, get an error as follows:

vc1<-read.table("P:\\R\\Everything-I.txt", header=T, sep=" ", dec=".",
na.strings=NA, strip.white=T)
attach(vc1)
Error in attach(vc1) : variable names are limited to 256 bytes

Is there a way to get around this, and make R accept the given variable names? Or will I have to shorten them?


Also, when I try to read in a much larger file with 430 columns, I get the error:

Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, :
 line 397 did not have 431 elements

Is it that R isn't dealing too well with Excel-converted-to-text files? Is it a function of file size?

I have double-checked the 430 column file and all data seems to be in place.


Thanks for your help!

Aditi




----------------------
A Singh
aditi.si...@bristol.ac.uk
School of Biological Sciences
University of Bristol

______________________________________________
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