[Rd] dput/dget when a data frame has 2 rows (PR#9627)
pdmmac at mcmaster.ca
pdmmac at mcmaster.ca
Sun Apr 22 05:19:20 CEST 2007
This doesn't seem right; I'm using R version 2.4.1 (2006-12-18) on Mac OS
and Win XP and find the same issue:
> mydataframe <- data.frame(ppi=c(.5,.5),mmu=c(5,10))
> dput(mydataframe,"mydataframe.txt")
> dget("mydataframe.txt")
Error in attributes(.Data) <- c(attributes(.Data), attrib) :
row names must be 'character' or 'integer', not 'double'
> mydataframe3 <- data.frame(ppi=c(.5,.5,.5),mmu=c(5,10,15))
> dput(mydataframe3,"mydataframe3.txt")
> dget("mydataframe3.txt")
ppi mmu
1 0.5 5
2 0.5 10
3 0.5 15
--
Peter D.M. Macdonald, D.Phil., P.Stat.
Professor of Math & Statistics
McMaster University
Hamilton, Ontario, Canada L8S 4K1
More information about the R-devel
mailing list