[datatable-help] Possible bug in 1.9.x versions
Matt Dowle
mdowle at mdowle.plus.com
Thu Feb 27 16:14:30 CET 2014
From those messages, it looks like the install didn't work properly.
This can happen on Windows if another process is still using the older .dll.
On every release we usually do get reports like this.
Since it is Windows, let's try overkill first :
1. Close all R sessions
2. To be sure, reboot. This ensures all locks on open .dlls are fully
cleared.
3. Start R
4. remove.package("data.table")
5. install.packages("data.table")
6. require(data.table)
7. test.data.table() -- does it work?
8. Rerun test
The Windows .zip for 1.9.2 is now on the homepage, so it's best to use
that one please.
Matt
On 27/02/14 15:05, carrieromichele wrote:
> I just installed the new data.table versions. I tried both
> 1.9.0, available (binary) at
> http://datatable.r-forge.r-project.org/data.table_1.9.0.zip, and 1.9.2
> (CRAN) building from source (using Rtools)
>
> After installing I run my BAU scripts and found out that I had
> different results... this is what I could made reproducible
>
> 1.8.10
>
> > library(data.table)
> data.table 1.8.10 For help type: help("data.table")
> > set.seed(1)
> > dt <- data.table(id=rep(1:4, each=3),
> + var1 = rep(letters[1:3], 4),
> + var2 = rnorm(12),
> + key="id,var1")
> > dt
> id var1 var2
> 1: 1 a -0.6264538
> 2: 1 b 0.1836433
> 3: 1 c -0.8356286
> 4: 2 a 1.5952808
> 5: 2 b 0.3295078
> 6: 2 c -0.8204684
> 7: 3 a 0.4874291
> 8: 3 b 0.7383247
> 9: 3 c 0.5757814
> 10: 4 a -0.3053884
> 11: 4 b 1.5117812
> 12: 4 c 0.3898432
> >
> > key(dt)
> [1] "id" "var1"
> > dt[.(unique(id)), list(var1, var2)]
> id var1 var2
> 1: 1 a -0.6264538
> 2: 1 b 0.1836433
> 3: 1 c -0.8356286
> 4: 2 a 1.5952808
> 5: 2 b 0.3295078
> 6: 2 c -0.8204684
> 7: 3 a 0.4874291
> 8: 3 b 0.7383247
> 9: 3 c 0.5757814
> 10: 4 a -0.3053884
> 11: 4 b 1.5117812
> 12: 4 c 0.3898432
>
> 1.9.0
>
>
> > library(data.table)
> data.table 1.9.0 For help type: help("data.table")
> Warning message:
> package 'data.table' was built under R version 3.1.0
> > set.seed(1)
> > dt <- data.table(id=rep(1:4, each=3),
> + var1 = rep(letters[1:3], 4),
> + var2 = rnorm(12),
> + key="id,var1")
> > dt
> id var1 var2
> 1: 1 a -0.6264538
> 2: 1 b 0.1836433
> 3: 1 c -0.8356286
> 4: 2 a 1.5952808
> 5: 2 b 0.3295078
> 6: 2 c -0.8204684
> 7: 3 a 0.4874291
> 8: 3 b 0.7383247
> 9: 3 c 0.5757814
> 10: 4 a -0.3053884
> 11: 4 b 1.5117812
> 12: 4 c 0.3898432
> >
> > key(dt)
> [1] "id" "var1"
> > dt[.(unique(id)), list(var1, var2)]
> id var1 var2
> 1: 1 a -0.6264538
> 2: 1 a 0.1836433
> 3: 1 a -0.8356286
> 4: 2 a 1.5952808
> 5: 2 a 0.3295078
> 6: 2 a -0.8204684
> 7: 3 a 0.4874291
> 8: 3 a 0.7383247
> 9: 3 a 0.5757814
> 10: 4 a -0.3053884
> 11: 4 a 1.5117812
> 12: 4 a 0.3898432
>
> 1.9.2
>
> > library("data.table", lib.loc="C:/Program Files/R/R-3.0.2/library")
> data.table 1.9.2 For help type: help("data.table")
> > set.seed(1)
> > dt <- data.table(id=rep(1:4, each=3),
> + var1 = rep(letters[1:3], 4),
> + var2 = rnorm(12),
> + key="id,var1")
> Error in forder(x, cols, sort = TRUE, retGrp = FALSE) :
> object 'Cforder' not found
> > dt
> id var1 var2
> 1: 1 a -0.6264538
> 2: 1 b 0.1836433
> 3: 1 c -0.8356286
> 4: 2 a 1.5952808
> 5: 2 b 0.3295078
> 6: 2 c -0.8204684
> 7: 3 a 0.4874291
> 8: 3 b 0.7383247
> 9: 3 c 0.5757814
> 10: 4 a -0.3053884
> 11: 4 b 1.5117812
> 12: 4 c 0.3898432
> >
> > key(dt)
> [1] "id" "var1"
> > dt[.(unique(id)), list(var1, var2)]
> Error in `[.data.table`(dt, .(unique(id)), list(var1, var2)) :
> object 'Cbmerge' not found
>
> It seems that in the 1.9.0 version when you join using fewer keys than
> the whole set of keys, the first values of the remaining keys are
> "carried forward". Other column looks fine.
>
> In the 1.9.2 instead some dependencies seem missing.
>
>
>
>
> _______________________________________________
> datatable-help mailing list
> datatable-help at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/datatable-help/attachments/20140227/a37a6c6a/attachment-0001.html>
More information about the datatable-help
mailing list