[R] Error in edit.data.frame

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Nov 4 12:46:37 CET 2003

On Tue, 4 Nov 2003, Jeffrey Todd Lins wrote:

> I recently attempted to read a .txt file using both read.table("
> ",header=TRUE)  and read.delim(" ",header=TRUE)  and received the
> following message

Not from those commands, though.

> Error in edit.data.frame(get(subx, envir = parent), ...) :
>         symbol print-name too long
> I am able to also create a variable x<-read.delim (" ",header=TRUE ) ,
> but am unable to fix(x) because of the same errror
> Error in edit.data.frame(get(subx, envir = parent), ...) :
>         symbol print-name too long
> I have read nearly identical files many times without problems - indeed,
> a subsequent, slightly different query of very similar data, formatted
> in same operation, did not give this error when read by R.
> I suspect the error is the result of some overly long string somewhere,
> in a column header, since I do not encounter the error, when changing
> the command to header=FALSE.  However, I need the variable names, and I
> if there are restrictions on the length of these names, then I will need
> to know them so that they are made parameters for data entry in the
> original data source.

There is a limit of 256 on the length of a symbol.

> Do I just have to live with this or is there a fix of some kind?  

You could look at the names (names(x)) and come up with some sensible 
names.  You will be unable to do things like attach() on longer names 

You really haven't given us enough information: there are three separate 
versions of the dataeditor, so which OS, which version of R and please 
give us an actual example?  Then we may be able to see if we can 
circumvent this.

Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

More information about the R-help mailing list