Skip to content

Commit 5a27d4a

Browse files
final
1 parent 1a3044f commit 5a27d4a

File tree

2 files changed

+0
-13
lines changed

2 files changed

+0
-13
lines changed

R/print.data.table.R

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ print.data.table = function(x, topn=getOption("datatable.print.topn"),
6262
}
6363
return(invisible(x))
6464
}
65-
index_dt <- NULL
6665
if (show.indices) {
6766
if (is.null(indices(x))) {
6867
show.indices = FALSE
@@ -84,9 +83,6 @@ print.data.table = function(x, topn=getOption("datatable.print.topn"),
8483
toprint = x
8584
rn = seq_len(n_x)
8685
printdots = FALSE
87-
if (!is.null(index_dt) && nrow(index_dt) != nrow(toprint)) {
88-
show.indices = FALSE
89-
}
9086
if (show.indices) toprint = cbind(toprint, index_dt)
9187
}
9288
require_bit64_if_needed(x)

inst/tests/tests.Rraw

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21070,12 +21070,3 @@ if (exists("sort_by", "package:base")) {
2107021070
test(2306.24, DT1[, sort_by(.SD, ~.(a, b))], data.table(a=c(1, 2, 3, 3, NA), b=c(4L, 2L, 0L, 3L, 1L)))
2107121071
}
2107221072

21073-
#fix for (#6806)
21074-
DT2 <- data.table(a = 1:3, b = 4:6)
21075-
index_dt <- data.table(a = 1:2, b = 3:4)
21076-
toprint <- data.table(a = 1:3, b = 3:5)
21077-
show.indices <- TRUE
21078-
if (!is.null(index_dt) && nrow(index_dt) != nrow(toprint)) {
21079-
show.indices <- FALSE
21080-
}
21081-
test(2307, print(show.indices), output = "FALSE")

0 commit comments

Comments
 (0)