Learn R Programming

rchallenge (version 1.3.4)

publish: Render your challenge R Markdown script to a HTML page.

Description

Render your challenge R Markdown script to a HTML page.

Usage

publish(
  input = "challenge.rmd",
  output_file = "index.html",
  output_dir = dirname(input),
  quiet = FALSE,
  ...
)

Arguments

input

string. name of the R Markdown input file

output_file

string. output file. If NULL then a default based on the name of the input file is chosen.

output_dir

string. output directory. Defaults to the directory of the input file. make sure that the output HTML file will be published online.

quiet

logical. deactivate text output.

...

further arguments to pass to render.

Value

The compiled document is written into the output file, and the path of the output file is returned.

See Also

render

Examples

Run this code
# NOT RUN {
path <- tempdir()
wd <- setwd(path)
new_challenge()
outdir = tempdir()
if (rmarkdown::pandoc_available('1.12.3')) {
  publish(output_dir = outdir, output_options = list(self_contained = FALSE))
}
unlink(outdir)
setwd(wd)
unlink(path)
# }

Run the code above in your browser using DataLab