Just to confirm. The CJ behavior I reported is throwing errors in the
development build as well as the CRAN release.
> library(data.table)
data.table 1.7.5 For help type: help("data.table")
> Y <- factor(1:2, levels=1:2, labels=c("MATHEMATICS", "READING"))
> Z <- factor(1:3, levels=1:3, labels=paste(2008:2010, 2009:2011, sep="_"))
> tmp.cj <- CJ(Y,Z)
> as.data.frame(tmp.cj)
V1 V2
1 MATHEMATICS 2008_2009
2 MATHEMATICS 2009_2010
3 MATHEMATICS 2010_2011
4 READING <NA>
5 READING <NA>
6 READING <NA>
Warning message:
In format.data.frame(x, digits = digits, na.encode = FALSE) :
corrupt data frame: columns will be truncated or padded with NAs
This error doesn't occur when one feeds a character vector instead of a factor
into CJ.
Damian
_______________________________________________
datatable-help mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help