@@ -20748,15 +20748,17 @@ test(2301.3, DT[order(a, -b, decreasing=c(TRUE, TRUE))], error="Mixing '-' with
2074820748test(2301.4, DT[order(a, b, decreasing=c(TRUE, TRUE, FALSE))], error="decreasing= has length 3")
2074920749
2075020750# as.data.table should remove extra attributes from extended data.frames #5699
20751- x = data.frame(a=c(1,5, 3), b=c(2,4, 6))
20751+ x = data.frame(a=c(1, 5, 3), b=c(2, 4, 6))
2075220752class(x) = c("tbl", "data.frame")
2075320753attr(x, "t1") = "a"
2075420754as.data.frame.tbl = function(x) {
2075520755 attr(x, "t1") = NULL
2075620756 class(x) = "data.frame"
2075720757 x
2075820758}
20759- test(2302, attr(as.data.table(y), "t1"), attr(as.data.frame(y), "t1"))
20759+ test(2302.1, attr(as.data.table(y), "t1"), attr(as.data.frame(y), "t1"))
20760+ class(x) = c("data.frame", "data.table", "data.frame") # #6739
20761+ test(2302.2, as.data.table(x), data.table(a=c(1, 5, 3), b=c(2, 4, 6)))
2076020762
2076120763# by=foo(KEY) does not retain key (no way to guarantee monotonic transformation), #5583
2076220764DT = data.table(a=1:2, key='a')
0 commit comments