Is this a bug? (Mac OS X 10.6.8, R 2.14.0, data.table 1.7.6)
> library(data.table)
data.table 1.7.6 For help type: help("data.table")
> df=data.frame(x=c("a", "a", "b", "b"), y=c("a", "a", "b", "b"))
> df
x y
1 a a
2 a a
3 b b
4 b b
> unique(df)
x y
1 a a
3 b b
> dt=as.data.table(df)
> dt
x y
[1,] a a
[2,] a a
[3,] b b
[4,] b b
> unique(dt)
x y
[1,] a a
[2,] b b
> setkey(dt, x)
> unique(dt)
Error in `[.default`(x, , key(x), with = FALSE) :
incorrect number of dimensions
--Steve
_______________________________________________
datatable-help mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help