Is it possible to save the page which I see when use View()
command in RStudio on some data as an html file?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Maybe your data looks like the mtcars data
data(mtcars)
View(mtcars)
library(xtable)
sink command sends output to a file
sink('somehtmlfile.html')
print(xtable(mtcars),type='html')
then return things back to normal with
sink()
now open the somehtmlfile.html in a browser