如何在底部禁用data.table名称?

Ole*_*dar 4 printing r data.table

我在Windows 7上运行Rstudio 0.99.489和R-3.2.3

如何避免在数据底部打印V1和N?

options(datatable.print.nrows = Inf)
dt <- data.table(sample.int(2e3, 1e4, T))
print(dt[ , .(.N), V1])

...
1980:  419  1
1981:  898  2
1982: 1260  1
        V1  N
Run Code Online (Sandbox Code Playgroud)

jan*_*cki 5

您可以将对象的打印操作为常规字符向量.

library(data.table)
options(datatable.print.nrows = Inf)
dt = data.table(sample.int(2e3, 1e4, T))
myprint = function(x){
    prnt = capture.output(print(x))
    cat(prnt[-length(prnt)], sep="\n")
}
myprint(dt[ , .(.N), V1])
Run Code Online (Sandbox Code Playgroud)