inst/unitTests/test_knitr.R

library(knitr)

test_knitr = function(){

  #write to testRmd.html
  knit2html(system.file("examples/testRmd.Rmd", package="ReportingTools"))
  checkTrue(file.exists("testRmd.html"))
  lines = readLines("testRmd.html")
  checkTrue(length(grep("Error", lines)) == 0)
}

Try the ReportingTools package in your browser

Any scripts or data that you put into this service are public.

ReportingTools documentation built on March 10, 2021, 2 a.m.