Skip to content
Prev 10901 / 63421 Next

assigning to a null data frame. (PR#4727)

Full_Name: Ben K.
Version: 1.8.0
OS: win2k
Submission from: (NULL) (208.243.20.222)



This fails:

vars<-data.frame(NULL)
vars$delta<-4

output: Error in "$<-.data.frame"(`*tmp*`, "delta", value = 4) : 
        replacement has 1 rows, data has 0

It worked in 1.7.0 and all previous, and if we initialize vars without NULL, 
R is OK with it:

vars<-data.frame(dummy=4)
vars$delta<-4