I want to have NULL values in my data.frame (not NA). And the following doesn't seem to work.
> data.frame(x = c(1, 2, 3), y = c(NULL, NULL, NULL))
Error in data.frame(x = c(1, 2, 3), y = c(NULL, NULL, NULL)) :
arguments imply differing number of rows: 3, 0
My goal is to output my data.frame into a .csv file, and the cells with the NULL values should be blank.
data.frame(x = c(1, 2, 3), y = "").d <- data.frame(x=1:3); d$y <- replicate(3, NULL)y. I think it depends on what Adrian needs.write.table()allows you to control how those values are rendered:na = "NA"NULLvalues within a data.frame is really problematic. I think the more appropriate question to be asking (and you did) is "how to get empty values in a CSV".