rmd_to_html: Config some options for Knitr tranlate Rmd file to HTML file

Description Usage Arguments Details Value A Custom Section Note Author(s) Source References See Also Examples

View source: R/rmd_to_html.R

Description

This function inherit from rmarkdown::html_document function to config some options for Knitr tranlate Rmd file to HTML file.

Usage

1
2
rmd_to_html(df_print)
rmd_to_html(df_print, keep_md)

Arguments

code_folding

Enable document readers to toggle the display of R code chunks. Specify "none" to display all code chunks (assuming they were knit with echo = TRUE). Specify "hide" to hide all R code chunks by default (users can show hidden code chunks either individually or document-wide). Specify "show" to show all R code chunks by default.

fig_width

Default width (in inches) for figures

fig_height

Default height (in inches) for figures

fig_retina

Scaling to perform for retina displays (defaults to 2, which currently works for all widely used retina displays). Set to NULL to prevent retina scaling. Note that this will always be NULL when keep_md is specified (this is because fig_retina relies on outputting HTML directly into the markdown document).

keep_md

Keep the markdown file generated by knitting.

dev

Graphics device to use for figure output (defaults to png)

fig_caption

TRUE to render figures with captions

md_extensions

Markdown extensions to be added or removed from the default definition or R Markdown. See the rmarkdown_format for additional details.

self_contained

Produce a standalone HTML file with no external dependencies, using data: URIs to incorporate the contents of linked scripts, stylesheets, images, and videos. Note that even for self contained documents MathJax is still loaded externally (this is necessary because of its size).

df_print

Method to be used for printing data frames. Valid values include "default", "kable", "tibble", and "paged". The "default" method uses a corresponding S3 method of print, typically print.data.frame. The "kable" method uses the knitr::kable function. The "tibble" method uses the tibble package to print a summary of the data frame. The "paged" method creates a paginated HTML table (note that this method is only valid for formats that produce HTML). In addition to the named methods you can also pass an arbitrary function to be used for printing data frames. You can disable the df_print behavior entirely by setting the option rmarkdown.df_print to FALSE.

smart

Produce typographically correct output, converting straight quotes to curly quotes, --- to em-dashes, -- to en-dashes, and ... to ellipses.

...

Additional function arguments to pass to the base R Markdown HTML output formatter html_document_base

toc

Not config option.

toc_depth

Not config option.

Details

Details for some things.

Value

Return HTML file in same folder of Rmd file.

A Custom Section

Text accompanying the custom section.

Note

Author(s)

Trát Quang Th<U+1EE5>y

Source

References

label-1

text-1

label-2

text-2

See Also

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
add_numbers(1, 2) ## returns 3

## don't run this in calls to 'example(add_numbers)'
## Not run: 
add_numbers(2, 3)

## End(Not run)

## don't test this during 'R CMD check'

add_numbers(4, 5)

BabyMouse/Rb3m documentation built on June 4, 2020, 11:21 a.m.