[datatable-help] Behavior of CJ

Damian Betebenner dbetebenner at nciea.org
Fri Dec 2 12:57:19 CET 2011


All,

CJ is behaving a little different (throwing an error) than it has previously and I'm not sure whether this is a bug or a desired feature.

tmp.content_areas <- factor(c("READING", "MATHEMATICS"))
tmp.years <- factor(c("2010_2011", "2009_2010", "2008_2009"), levels=paste(2006:2010, 2007:2011, sep="_"))

CJ(tmp.content_areas, tmp.years)
Error in setkey(l) : logical error nrow(dt)!=length(order)


However:

CJ(tmp.content_areas, sort(tmp.years))

              V1        V2
[1,]     READING 2008_2009
[2,]     READING 2009_2010
[3,]     READING 2010_2011
[4,] MATHEMATICS 2008_2009
[5,] MATHEMATICS 2009_2010
[6,] MATHEMATICS 2010_2011


Any help greatly appreciated,

Damian

Damian Betebenner
Center for Assessment
PO Box 351
Dover, NH   03821-0351

Phone (office): (603) 516-7900
Phone (cell): (857) 234-2474
Fax: (603) 516-7910

dbetebenner at nciea.org<mailto:dbetebenner at nciea.org>
www.nciea.org<http://www.nciea.org/>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/datatable-help/attachments/20111202/918167dc/attachment.htm>


More information about the datatable-help mailing list