makeReport {PaRe}R Documentation

makeReport

Description

Uses rmarkdown's render function to render a html-report of the given package.

Usage

makeReport(repo, outputFile, showCode = FALSE)

Arguments

repo

(Repository)
Repository object.

outputFile

(character)
Path to html-file.

showCode

(logical: FALSE)
Logical to show code or not in the report.

Value

(NULL)

Examples


fetchedRepo <- tryCatch(
  {
    # Set dir to clone repository to.
    tempDir <- tempdir()
    pathToRepo <- file.path(tempDir, "glue")

    # Clone repo
    git2r::clone(
      url = "https://github.com/darwin-eu/IncidencePrevalence.git",
      local_path = pathToRepo
    )

    # Create instance of Repository object.
    repo <- PaRe::Repository$new(path = pathToRepo)

    # Set fetchedRepo to TRUE if all goes well.
    TRUE
  },
  error = function(e) {
    # Set fetchedRepo to FALSE if an error is encountered.
    FALSE
  },
  warning = function(w) {
    # Set fetchedRepo to FALSE if a warning is encountered.
    FALSE
  }
)

if (fetchedRepo) {
  # Run makeReport on the Repository object.
  makeReport(repo = repo, outputFile = tempfile())
}


[Package PaRe version 0.1.13 Index]