You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling rbind on 2 data sets with common and new variables, having "labelled" variables in one of the data sets generates an error in rbind. Interestingly, the order of data sets does matter. The functions spss.get in Hmisc generates such variables.
require(data.table);require(Hmisc)
## Generate a labeled numeric
x <- c(1:2)
label(x) <- c("a")
## Generate two data.tables with 1 overlapping and 1 new column x
d1 <- data.table(v1=1:2,x=x)
d2 <- data.table(v1=3:4)
#does not work!?
rbind(d2,d1,fill=TRUE)
#this order works
rbind(d1,d2,fill=TRUE)
The text was updated successfully, but these errors were encountered:
When calling rbind on 2 data sets with common and new variables, having "labelled" variables in one of the data sets generates an error in rbind. Interestingly, the order of data sets does matter. The functions spss.get in Hmisc generates such variables.
The text was updated successfully, but these errors were encountered: