显示PDF报告的系统时间

时间:2016-10-13 18:25:20

标签: r pdf

我正在尝试将R报告的标题页写入pdf。 (是的;我肯定会发誓,降价,可能还有其他事情会使它看起来更漂亮,但我想使用pdf())。

Sys.time命令似乎会覆盖我放置的任何其他文本。我在这里错过了什么吗?

function example(dataframe1,dataframe2){
      pdf("C:/Desktop/sample.pdf", 7, 5)

      plot(0:10, type = "n", xaxt="n", yaxt="n", bty="n", xlab = "", ylab = "")
      text(5, 8, "Comparison Report of:")
      text(5, 7, deparse(substitute(dataframe1)))
      text(5, 6, " & ")
      text(5, 5, deparse(substitute(dataframe2)))
      text(5, 4, paste(c("Created ",Sys.time()),compress=''))

      dev.off()
}

0 个答案:

没有答案