我可以将RSS添加到R2HTML吗?
将样本<script>
标记添加到下面的R2HTML代码
HTMLheaderText ="Sample Report"
HTMLfile =HTMLInitFile(outdir = getwd()
, filename = "sample"
, extension = "html"
, Title = "R Output"
, CSSFile = paste(getwd(), "/html_tables.css", sep="")
, HTMLframe = FALSE
, useGrid = FALSE
, useLaTeX = FALSE)
HTML(HTMLheaderText, file = HTMLfile)
HTML(dataSet, row.names = FALSE)
HTMLEndFile()
提前致谢
答案 0 :(得分:3)
当然,像往常一样给它一个字符串。
HTML('<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>', file = HTMLfile)
它将被包裹在<p class="character">
中。如果您不想要,只需手动附加到文件
cat('<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>', file = HTMLfile, append = TRUE, sep = " ")