[Rd] sourcing dput output
Gabor Grothendieck
ggrothendieck at gmail.com
Wed Oct 25 16:58:51 CEST 2006
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?
More information about the R-devel
mailing list