[R] Working around 256 byte variable names? + trouble opening large file

hadley wickham h.wickham at gmail.com
Mon Sep 21 22:22:13 CEST 2009


On Mon, Sep 21, 2009 at 3:04 PM, A Singh <Aditi.Singh at bristol.ac.uk> wrote:
> 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?

Don't use attach?

Hadley

-- 
http://had.co.nz/




More information about the R-help mailing list