@@ -11887,7 +11887,7 @@ test(1774.17, as.data.table(x, na.rm='a'), error="'na.rm' must be scalar")
1188711887
1188811888# verify print.keys works
1188911889DT1 <- data.table(a = 1:3, key = "a")
11890- test(1775.1, DT1, options = c(datatable. print.keys = TRUE),
11890+ test(1775.1, print( DT1, print.keys = TRUE),
1189111891 output = c("Key: <a>", " a", "1: 1", "2: 2", "3: 3"))
1189211892DT2 <- data.table(a = 1:3, b = 4:6)
1189311893setindexv(DT2, c("b","a"))
@@ -16704,10 +16704,10 @@ test(2125.05, print(DT, trunc.cols=TRUE, class=TRUE, row.names=FALSE),
1670416704 "1 variable not shown: \\[d <char>\\]"))
1670516705test(2125.06, print(DT, trunc.cols=TRUE, col.names="none"),
1670616706 output=c("^ 1: 0 bbbbbbbbbbbbb ccccccccccccc", ".*",
16707- "1 variable not shown: \\[d\\]", " "))
16707+ "1 variable not shown: \\[d\\]$ "))
1670816708test(2125.07, print(DT, trunc.cols=TRUE, class=TRUE, col.names="none"),
1670916709 output=c("^ 1: 0 bbbbbbbbbbbbb", ".*",
16710- "2 variables not shown: \\[c, d\\]", " "),
16710+ "2 variables not shown: \\[c, d\\]$ "),
1671116711 warning = "Column classes will be suppressed when col.names is 'none'")
1671216712options("width" = 20)
1671316713DT = data.table(a = vector("integer", 2),
@@ -21490,11 +21490,11 @@ test(2328.2, droplevels(DT), data.table(f=factor(), i=integer(), f2=factor()))
2149021490
2149121491#6882 print() output with col.names="none"
2149221492dt = data.table(short = 1:3, verylongcolumnname = 4:6)
21493- test(2329.1, print(dt, col.names = "none"), output = "1: 1 4\n2: 2 5\n3: 3 6\n ")
21493+ test(2329.1, print(dt, col.names = "none"), output = "1: 1 4\n2: 2 5\n3: 3 6$ ")
2149421494dt = data.table(x = 123456, y = "wide_string")
21495- test(2329.2, print(dt, col.names = "none"), output = "1: 123456 wide_string\n ")
21495+ test(2329.2, print(dt, col.names = "none"), output = "1: 123456 wide_string$ ")
2149621496dt = data.table(a = NA_integer_, b = NaN)
21497- test(2329.3, print(dt, col.names = "none"), output = "1: NA NaN\n ")
21497+ test(2329.3, print(dt, col.names = "none"), output = "1: NA NaN$ ")
2149821498
2149921499# Row name extraction from multiple vectors, #7136
2150021500x <- 1:3
0 commit comments