在 R 中打印一个 table 到新的 window

Print a table to new window in R

在 R 中,plot() 在 R 中打开一个新的 window 并显示一个图形。

有没有办法用 table 做同样的事情 - 而无需打印到命令行?

我不是指将 print()、head() 或 sink() 写入文件。

这会很有用,因为可以将 tables 转移到单独的 window 而不会弄乱控制台。

可能的解决方案:

查看、修复、页面、编辑

查看:仅查看数据框或矩阵
修复:可以编辑数据(但不能撤销!)
page: 就像linux less command
编辑:就像修复一样!
data.entry: 就好修了!

vprint <- function(x, ...) {
  require(htmltools)
  html_print(pre(paste0(capture.output(print(x, ...)), collapse="\n")))
}

vcat <- function(...) {
  require(htmltools)
  html_print(pre(paste0(capture.output(cat(...)), collapse="\n")))
}

vprint(mtcars)

vcat(str(mtcars))