0

For some days now I realized anytime I post a problem here people are unable to help and it kept me wondering what was wrong until I realized my dput function output added a pointer (problems = <pointer: 0x7fbe86389400>) in my output making it impossible for people to reproduce the problem. I something that worked fine has been complicated.

data10 <- structure(list(Group = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2), Workspace = c(1, 1, 1, 1, 
2, 2, 2, 2, 3, 3, 3, 3, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3), 
    Eye1 = c(4, 8, 5, 6, 3, 5, 4, 4, 5, 5, 7, 6, 4, 8, 4, 7, 
    5, 6, 4, 4, 6, 5, 4, 5), Hand1 = c(5, 6, 4, 4, 6, 5, 4, 7, 
    7, 5, 5, 5, 6, 4, 5, 4, 4, 5, 6, 4, 4, 3, 4, 5), Eye2 = c(3, 
    7, 7, 4, 4, 5, 6, 4, 4, 3, 4, 3, 6, 7, 4, 6, 4, 6, 7, 4, 
    3, 3, 4, 6), Hand2 = c(4, 6, 7, 4, 3, 3, 7, 5, 6, 6, 6, 4, 
    7, 4, 4, 7, 4, 4, 4, 6, 5, 7, 5, 5), Eye3 = c(4, 4, 5, 4, 
    5, 2, 5, 7, 4, 4, 4, 6, 5, 7, 4, 6, 5, 5, 3, 2, 3, 5, 6, 
    5), Hand3 = c(5, 5, 3, 2, 3, 5, 3, 5, 4, 6, 6, 4, 4, 4, 6, 
    4, 6, 3, 5, 4, 4, 5, 5, 7)), row.names = c(NA, -24L), spec = structure(list(
    cols = list(Group = structure(list(), class = c("collector_double", 
    "collector")), Workspace = structure(list(), class = c("collector_double", 
    "collector")), Eye1 = structure(list(), class = c("collector_double", 
    "collector")), Hand1 = structure(list(), class = c("collector_double", 
    "collector")), Eye2 = structure(list(), class = c("collector_double", 
    "collector")), Hand2 = structure(list(), class = c("collector_double", 
    "collector")), Eye3 = structure(list(), class = c("collector_double", 
    "collector")), Hand3 = structure(list(), class = c("collector_double", 
    "collector"))), default = structure(list(), class = c("collector_guess", 
    "collector")), delim = ","), class = "col_spec"), problems = <pointer: 0x7fbe86389400>, class = c("spec_tbl_df", 
"tbl_df", "tbl", "data.frame"))

1 Answers1

2

External pointers are not reproducible. To make a reproducible example with a data.table do this:

library(data.table)
DT <- data.table(a = 1) # example data table
dput(as.data.frame(DT))
## structure(list(a = 1), row.names = c(NA, -1L), class = "data.frame")

Then use this, i.e. put this into your SO question.

library(data.table)
DF <- structure(list(a = 1), row.names = c(NA, -1L), class = "data.frame")
DT <- as.data.table(DF)
G. Grothendieck
  • 254,981
  • 17
  • 203
  • 341