Learn R Programming

texor (version 1.5.3)

produce_html: call rmarkdown::render to generate html file

Description

call rmarkdown::render to generate html file

Usage

produce_html(
  article_dir,
  example = FALSE,
  web_dir = TRUE,
  interactive_mode = FALSE
)

Value

Renders a RJwrapper.html file in the /web folder, in example it will return TRUE

Arguments

article_dir

path to the directory which contains tex article

example

only enabled for running examples for documentation and to enable export of this function.

web_dir

option to create a new web directory, default TRUE

interactive_mode

interactive mode for converting articles with options. default FALSE

Examples

Run this code
# Note This is a minimal example to execute this function
article_dir <- system.file("examples/article",
                 package = "texor")
dir.create(your_article_folder <- file.path(tempdir(), "tempdir"))
x <- file.copy(from = article_dir, to = your_article_folder,recursive = TRUE,)
your_article_path <- paste(your_article_folder,"article",sep="/")
texor::include_style_file(your_article_path)
rmarkdown::pandoc_version()
texor::convert_to_markdown(your_article_path)
texor::generate_rmd(your_article_path)
texor::copy_other_files(your_article_path)
texor::produce_html(your_article_path,example = TRUE)
unlink(your_article_folder,recursive = TRUE)

Run the code above in your browser using DataLab