error in dput applied to dataframe (PR#9286) H higgins at nceas.ucsb.edu Tue, Oct 10, 2006 1:28 PM Full_Name: Daniel F Higgins Version: 2.4.0 OS: Windows XP and Mac OSX Submission from: (NULL) (128.111.242.49) Create a dataframe as indicated below and apply 'dput' to it; note that the row.names attribute is incorrect! ▾ Quoted text (4 lines) aaa <- c("AAA","BBB","AAA") bbb <- c(1,2,3) df <- data.frame(aaa,bbb) dput(df) structure(list(aaa = structure(c(1, 2, 1), .Label = c("AAA", "BBB"), class = "factor"), bbb = c(1, 2, 3)), .Names = c("aaa", "bbb"), row.names = c(NA, 3), class = "data.frame") ▾ Quoted text (2 lines) dput(df,file="puttest.R") dget("puttest.R") Error in attributes(.Data) <- c(attributes(.Data), attrib) : row names must be 'character' or 'integer', not 'double' ▾ Quoted text (1 line) However, if R version 2.3 is used, the value for row.names is: row.names = c("1", "2", "3") and the dget command then works