将RStudio的View()输出另存为html

闯入

是否可以将View()在RStudio中使用命令时看到的页面另存为html文件?

赛斯

也许您的数据看起来像mtcars数据

data(mtcars)
View(mtcars)

library(xtable)

下沉命令将输出发送到文件

sink('somehtmlfile.html')
print(xtable(mtcars),type='html')

然后用

sink()

现在在浏览器中打开somehtmlfile.html

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章