![](/img/trans.png)
[英]how to use knitr::spin to convert R script to html file with interactive plots
[英]Is it possible to call knitr::spin on two different R scripts and produce a single html file?
我有两个不同的R脚本。 我喜欢knitr :: spin的想法。 我想知道是否有办法在这两个脚本上调用spin,这两个脚本都使用roxygen2格式化并生成一个报告。
您可以在spin
函数中使用text
参数。 使用readLines
读取文件然后cat
写入输出:
cat (spin (text = c (readLines ("file_one.r"),
readLines ("file_two.r"))),
file = "output.html")
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.