From ggrothendieck at gmail.com  Wed Oct 25 16:58:51 2006
From: ggrothendieck at gmail.com (Gabor Grothendieck)
Date: Wed, 25 Oct 2006 10:58:51 -0400
Subject: [Rd] sourcing dput output
Message-ID: <971536df0610250758h661fd5cci6791a8e166b9aae3@mail.gmail.com>

Is this not supposed to work?

> dput(BOD, file = "/BOD.R")
> source("/BOD.R")
Error in attributes(.Data) <- c(attributes(.Data), attrib) :
        row names must be 'character' or 'integer', not 'double'

> dput(iris, file = "/iris.R")
> source("/iris.R")
Error in attributes(.Data) <- c(attributes(.Data), attrib) :
        row names must be 'character' or 'integer', not 'double'

> R.version.string # XP
[1] "R version 2.4.0 Patched (2006-10-07 r39598)"

I also tried control = "all" as an argument to dput as well as a number
of other control values but did not find one that worked.

dump("BOD.R", file = "/BOD.R"); source("/BOD.R")

and similarly for iris do work.  Also under 2.3.1pat dput output of these
two data frame could be sourced:

> dput("BOD", file = "/BOD.R")
> source("/BOD.R")
> dput("iris", file = "/iris.R")
> source("/iris.R")
> R.version.string
[1] "Version 2.3.1 Patched (2006-06-04 r38279)"

What is supposed to be the difference between dput and dump anyways
and should dput output be source-able like it used to be?




[Rd] sourcing dput output
Gabor Grothendieck