[R] error message for row names

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Nov 8 22:33:12 CET 2006


On Wed, 8 Nov 2006, Taka Matzmoto wrote:

> Hi R users -
>
> I got an error message when reading in a saved file (a list structure)
>
>> dget("REPLICATION001")
> Error in attributes(.Data) <- c(attributes(.Data), attrib) :
>        row names must be 'character' or 'integer', not 'double'
>
> I don't need row names and didn't even specify row names when I saved the
> file. What do I need to do for reading in the file successfully?

You haven't told us how you wrote the file, but my guess is that you used 
dput().  If so, consult the help page and note it says

      Deparsing an object is difficult, and not always possible.  With
      the default 'control = c("showAttributes")', 'dput()' attempts to
      deparse in a way that is readable, but for more complex or unusual
      objects, not likely to be parsed as identical to the original.
      Use 'control = "all"'  for the most complete deparsing; use
      'control = NULL' for the simplest deparsing, not even including
      attributes.

so your problem is described right there on the help page.

And please don't sent multiple messages on the same topic: your second 
message is about an inaccurate dput of the file, and not about an actual 
object in R.

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