【问题标题】:How to see saveHTML output ( "HTML file created at: index.html" )?如何查看 saveHTML 输出(“HTML 文件创建于:index.html”)?
【发布时间】:2016-12-12 06:29:24
【问题描述】:

我正在使用 saveHTML 命令保存一组图表,但我什么也没看到:

#install.packages("animation")
library(animation)
saveHTML({
    for(i in 2006:2010){ 
        htr2 = htr[htr$year==i , ]
        print(
            barchart( year ~ y_kayam, groups = shlav, htr2, auto.key = list(columns = 2))  
        )
        # plot(table (  htr2$y_mevukash , htr2$shlav  ) , ylab = "a yhd" , xlab="a shlav"  )
        #Sys.sleep(1) 
    }  
}, img.name = "Weibullpdf.html" ) 

我应该看到什么?

我收到消息

HTML file created at: index.html

【问题讨论】:

    标签: html r save


    【解决方案1】:

    您需要打开 html 文件。您可以使用 pander 包中的 openFileInOS 函数。

    openFileInOS("index.html")
    

    或者,您可以浏览到将保存在当前工作目录中的文件。

    【讨论】:

    • 嗨 Foxhound,它确实有帮助 - 谢谢!有没有办法为其他用户推送文件?是否可以从页面中删除代码?
    • 您只想保存图表,如果您参考我对other question 的回答,我已对其进行了修改以向您展示如何操作。
    猜你喜欢
    • 2014-04-12
    • 2018-08-18
    • 1970-01-01
    • 2020-06-20
    • 1970-01-01
    • 2014-12-17
    • 1970-01-01
    • 1970-01-01
    • 2018-08-10
    相关资源
    最近更新 更多