@@ -25,21 +25,21 @@ test(2.03, fdistinct(data.table(x=c(1L,1:2)), on="x", mult="last", cols=characte
2525test(2.04, fdistinct(data.table(x=c(1L,1:2, y=1:3)), on="x", mult="last", copy=NA), error="must be TRUE or FALSE")
2626local({
2727 d = data.table(x=1:2, y=1:2)
28- test(2.05, ans<- fdistinct(d, on="x", mult="last"), d)
28+ test(2.05, ans <- fdistinct(d, on="x", mult="last"), d)
2929 test(2.06, intersect(addresses(ans), addresses(d)), character())
30- test(2.07, ans<- fdistinct(d, on="x", mult="last", copy=FALSE), d)
30+ test(2.07, ans <- fdistinct(d, on="x", mult="last", copy=FALSE), d)
3131 test(2.08, addresses(ans), addresses(d))
3232})
3333local({
34- d = data.table(x=c(2:1,2L), y=1:3)
34+ d = data.table(x=c(2:1, 2L), y=1:3)
3535 test(2.09, fdistinct(d, on="x", mult="first"), data.table(x=2:1, y=1:2))
3636 test(2.10, fdistinct(d, on="x", mult="last"), data.table(x=1:2, y=2:3))
3737 setattr(attr(setattr(d, "index", integer()), "index", TRUE), "__x", forderv(d, "x", retGrp=TRUE)) ## retGrp=T index #4386
3838 test(2.11, fdistinct(d, on="x", mult="first"), data.table(x=2:1, y=1:2))
3939})
4040
4141local({
42- d = data.table(x=c(2:1,2L), y=1:3)
42+ d = data.table(x=c(2:1, 2L), y=1:3)
4343 test(3.01, hasindex(d, "x"))
4444 test(3.02, hasindex(d, "x", retGrp=TRUE))
4545 setattr(attr(setattr(d, "index", integer()), "index", TRUE), "__x", forderv(d, "x")) ## retGrp=F index #4386
0 commit comments