I have an object named output
that is of class data.frame
containing a list. I was wondering if it might be possible to save output
as a csv
file from R?
Here is my code:
d <- data.frame(list(A = c(kap = 2, sap = 3), B = c(kap = 1, sap = 4)))
d[] <- lapply(d, as.list) ## This step is required to show `TRUE` and `FALSE` in `output`
output <- data.frame(t(d), dap = c(T, F))
write.csv(output, "output.csv") # Error: unimplemented type 'list' in 'EncodeElement'