Title: | HTML Output Formats and Templates for 'rmarkdown' Documents |
---|---|
Description: | HTML formats and templates for 'rmarkdown' documents, with some extra features such as automatic table of contents, lightboxed figures, dynamic crosstab helper. |
Authors: | Julien Barnier [aut, cre] |
Maintainer: | Julien Barnier <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.0.4.9000 |
Built: | 2024-11-13 04:13:58 UTC |
Source: | https://github.com/juba/rmdformats |
Format for converting from R Markdown to an HTML document.
downcute( fig_width = 8, fig_height = 5, fig_caption = TRUE, lightbox = FALSE, thumbnails = FALSE, gallery = FALSE, toc_depth = 2, embed_fonts = TRUE, use_bookdown = FALSE, pandoc_args = NULL, md_extensions = NULL, mathjax = "rmdformats", highlight = NULL, default_style = c("light", "dark"), downcute_theme = c("default", "chaos"), style_switcher = TRUE, ... )
downcute( fig_width = 8, fig_height = 5, fig_caption = TRUE, lightbox = FALSE, thumbnails = FALSE, gallery = FALSE, toc_depth = 2, embed_fonts = TRUE, use_bookdown = FALSE, pandoc_args = NULL, md_extensions = NULL, mathjax = "rmdformats", highlight = NULL, default_style = c("light", "dark"), downcute_theme = c("default", "chaos"), style_switcher = TRUE, ... )
fig_width |
Default width (in inches) for figures |
fig_height |
Default width (in inches) for figures |
fig_caption |
|
lightbox |
if TRUE, add lightbox effect to content images |
thumbnails |
if TRUE display content images as thumbnails |
gallery |
if TRUE and lightbox is TRUE, add a gallery navigation between images in lightbox display |
toc_depth |
adjust table of contents depth |
embed_fonts |
if TRUE, use local files for fonts used in the template. This leads to bigger files but ensures that these fonts are available. If FALSE they are downloaded from Google Web Fonts. |
use_bookdown |
if TRUE, uses |
pandoc_args |
arguments passed to the pandoc_args argument of rmarkdown |
md_extensions |
arguments passed to the md_extensions argument of rmarkdown |
mathjax |
set to NULL to disable Mathjax insertion |
highlight |
syntax highlighting, forced to NULL as highlighting is done via prism.js |
default_style |
specify default display style, "light" or "dark" |
downcute_theme |
document template theme |
style_switcher |
if TRUE (default), display a toggle button to switch between light and dark styles |
... |
Additional function arguments passed to R Markdown |
CSS taken from the docute project and adaptations made by John Coene. Please note that as syntax highlighting is done with the Prism JavaScript library, using the 'highlight' argument here will have no effect.
R Markdown output format to pass to render
Format for converting from R Markdown to an HTML document.
html_clean( fig_width = 6, fig_height = 6, fig_caption = TRUE, highlight = "kate", lightbox = TRUE, thumbnails = TRUE, gallery = FALSE, toc = TRUE, toc_depth = 2, use_bookdown = FALSE, pandoc_args = NULL, md_extensions = NULL, mathjax = "rmdformats", ... )
html_clean( fig_width = 6, fig_height = 6, fig_caption = TRUE, highlight = "kate", lightbox = TRUE, thumbnails = TRUE, gallery = FALSE, toc = TRUE, toc_depth = 2, use_bookdown = FALSE, pandoc_args = NULL, md_extensions = NULL, mathjax = "rmdformats", ... )
fig_width |
Default width (in inches) for figures |
fig_height |
Default width (in inches) for figures |
fig_caption |
|
highlight |
Syntax highlighting style. Supported styles include
"default", "tango", "pygments", "kate", "monochrome", "espresso",
"zenburn", "haddock", and "textmate". Pass |
lightbox |
if TRUE, add lightbox effect to content images |
thumbnails |
if TRUE display content images as thumbnails |
gallery |
if TRUE and lightbox is TRUE, add a gallery navigation between images in lightbox display |
toc |
if TRUE, display a table of contents |
toc_depth |
adjust table of contents depth |
use_bookdown |
if TRUE, uses |
pandoc_args |
arguments passed to the pandoc_args argument of rmarkdown |
md_extensions |
arguments passed to the md_extensions argument of rmarkdown |
mathjax |
set to NULL to disable Mathjax insertion |
... |
Additional function arguments passed to R Markdown |
Styling and features are very similar to the ones from the great knitrBootstrap package by Jim Hester : https://github.com/jimhester/knitrBootstrap
R Markdown output format to pass to render
Format for converting from R Markdown to an HTML document.
html_docco( fig_width = 6, fig_height = 6, fig_caption = TRUE, highlight = "kate", lightbox = TRUE, thumbnails = TRUE, gallery = FALSE, use_bookdown = FALSE, pandoc_args = NULL, md_extensions = NULL, mathjax = "rmdformats", ... )
html_docco( fig_width = 6, fig_height = 6, fig_caption = TRUE, highlight = "kate", lightbox = TRUE, thumbnails = TRUE, gallery = FALSE, use_bookdown = FALSE, pandoc_args = NULL, md_extensions = NULL, mathjax = "rmdformats", ... )
fig_width |
Default width (in inches) for figures |
fig_height |
Default width (in inches) for figures |
fig_caption |
|
highlight |
Syntax highlighting style. Supported styles include
"default", "tango", "pygments", "kate", "monochrome", "espresso",
"zenburn", "haddock", and "textmate". Pass |
lightbox |
if TRUE, add lightbox effect to content images |
thumbnails |
if TRUE display content images as thumbnails |
gallery |
if TRUE and lightbox is TRUE, add a gallery navigation between images in lightbox display |
use_bookdown |
if TRUE, uses |
pandoc_args |
arguments passed to the pandoc_args argument of rmarkdown |
md_extensions |
arguments passed to the md_extensions argument of rmarkdown |
mathjax |
set to NULL to disable Mathjax insertion |
... |
Additional function arguments passed to rmarkdown |
The CSS is heavily inspired from the default one of the docco project : https://ashkenas.com/docco/.
R Markdown output format to pass to render
Format for converting from R Markdown to an HTML document.
lockdown(...)
lockdown(...)
... |
Additional function arguments passed to R Markdown |
TODO
R Markdown output format to pass to render
Format for converting from R Markdown to an HTML document with a material design theme.
material( fig_width = 6, fig_height = 6, fig_caption = TRUE, highlight = "kate", lightbox = TRUE, thumbnails = TRUE, gallery = FALSE, cards = TRUE, use_bookdown = FALSE, pandoc_args = NULL, md_extensions = NULL, mathjax = "rmdformats", ... )
material( fig_width = 6, fig_height = 6, fig_caption = TRUE, highlight = "kate", lightbox = TRUE, thumbnails = TRUE, gallery = FALSE, cards = TRUE, use_bookdown = FALSE, pandoc_args = NULL, md_extensions = NULL, mathjax = "rmdformats", ... )
fig_width |
Default width (in inches) for figures |
fig_height |
Default width (in inches) for figures |
fig_caption |
|
highlight |
Syntax highlighting style. Supported styles include
"default", "tango", "pygments", "kate", "monochrome", "espresso",
"zenburn", "haddock", and "textmate". Pass |
lightbox |
if TRUE, add lightbox effect to content images |
thumbnails |
if TRUE display content images as thumbnails |
gallery |
if TRUE and lightbox is TRUE, add a gallery navigation between images in lightbox display |
cards |
if TRUE, sections will be presented as distinct and animated cards |
use_bookdown |
if TRUE, uses |
pandoc_args |
arguments passed to the pandoc_args argument of rmarkdown |
md_extensions |
arguments passed to the md_extensions argument of rmarkdown |
mathjax |
set to NULL to disable Mathjax insertion |
... |
Additional function arguments passed to R Markdown |
JavaScript and CSS taken and adapted from the Material design theme for Bootstrap 3 project : https://github.com/FezVrasta/bootstrap-material-design.
R Markdown output format to pass to render
Given a two dimensions contingency table, this function outputs HTML code to display, within a dynamic tabbed interface, the count, row percentages, column percentages and chi-squared residuals tables.
pilltabs( tab, count = TRUE, rows = TRUE, cols = TRUE, chisq = TRUE, resid = TRUE, row.names = TRUE )
pilltabs( tab, count = TRUE, rows = TRUE, cols = TRUE, chisq = TRUE, resid = TRUE, row.names = TRUE )
tab |
a two dimensions table object |
count |
whether or not to display the count table |
rows |
whether or not to display the row percentages table |
cols |
whether or not to display the column percentages table |
chisq |
whether or not to display the table chi-squared test results |
resid |
whether or not to display the chi-squared residuals table |
row.names |
whether or not to display the table row names |
The function is intended to be called inside an rmarkdown document.
No value is returned.
data(airquality) tab <- table(airquality$Month, airquality$Ozone > 25) pilltabs(tab)
data(airquality) tab <- table(airquality$Month, airquality$Ozone > 25) pilltabs(tab)
Not to be used directly
## S3 method for class 'pilltabs' print(x, ...) ## S3 method for class 'pilltabs' knit_print(x, ...)
## S3 method for class 'pilltabs' print(x, ...) ## S3 method for class 'pilltabs' knit_print(x, ...)
x |
data to be printed, generated by |
... |
arguments passed to other methods |
Format for converting from R Markdown to an HTML document.
readthedown( fig_width = 8, fig_height = 5, fig_caption = TRUE, highlight = "kate", lightbox = FALSE, thumbnails = FALSE, gallery = FALSE, toc_depth = 2, embed_fonts = TRUE, use_bookdown = FALSE, pandoc_args = NULL, md_extensions = NULL, mathjax = "rmdformats", ... )
readthedown( fig_width = 8, fig_height = 5, fig_caption = TRUE, highlight = "kate", lightbox = FALSE, thumbnails = FALSE, gallery = FALSE, toc_depth = 2, embed_fonts = TRUE, use_bookdown = FALSE, pandoc_args = NULL, md_extensions = NULL, mathjax = "rmdformats", ... )
fig_width |
Default width (in inches) for figures |
fig_height |
Default width (in inches) for figures |
fig_caption |
|
highlight |
Syntax highlighting style. Supported styles include
"default", "tango", "pygments", "kate", "monochrome", "espresso",
"zenburn", "haddock", and "textmate". Pass |
lightbox |
if TRUE, add lightbox effect to content images |
thumbnails |
if TRUE display content images as thumbnails |
gallery |
if TRUE and lightbox is TRUE, add a gallery navigation between images in lightbox display |
toc_depth |
adjust table of contents depth |
embed_fonts |
if TRUE, use local files for fonts used in the template. This leads to bigger files but ensures that these fonts are available. If FALSE they are downloaded from Google Web Fonts. |
use_bookdown |
if TRUE, uses |
pandoc_args |
arguments passed to the pandoc_args argument of rmarkdown |
md_extensions |
arguments passed to the md_extensions argument of rmarkdown |
mathjax |
set to NULL to disable Mathjax insertion |
... |
Additional function arguments passed to R Markdown |
CSS adapted from the readtheorg theme of the org-html-themes project : https://github.com/fniessen/org-html-themes, which is itself inspired by the Read the docs theme : https://readthedocs.org/.
R Markdown output format to pass to render
Format for converting from R Markdown to an HTML document.
robobook( fig_width = 8, fig_height = 5, fig_caption = TRUE, highlight = "kate", lightbox = FALSE, thumbnails = FALSE, gallery = FALSE, toc_depth = 2, embed_fonts = TRUE, use_bookdown = FALSE, pandoc_args = NULL, md_extensions = NULL, mathjax = "rmdformats", ... )
robobook( fig_width = 8, fig_height = 5, fig_caption = TRUE, highlight = "kate", lightbox = FALSE, thumbnails = FALSE, gallery = FALSE, toc_depth = 2, embed_fonts = TRUE, use_bookdown = FALSE, pandoc_args = NULL, md_extensions = NULL, mathjax = "rmdformats", ... )
fig_width |
Default width (in inches) for figures |
fig_height |
Default width (in inches) for figures |
fig_caption |
|
highlight |
Syntax highlighting style. Supported styles include
"default", "tango", "pygments", "kate", "monochrome", "espresso",
"zenburn", "haddock", and "textmate". Pass |
lightbox |
if TRUE, add lightbox effect to content images |
thumbnails |
if TRUE display content images as thumbnails |
gallery |
if TRUE and lightbox is TRUE, add a gallery navigation between images in lightbox display |
toc_depth |
adjust table of contents depth |
embed_fonts |
if TRUE, use local files for fonts used in the template. This leads to bigger files but ensures that these fonts are available. If FALSE they are downloaded from Google Web Fonts. |
use_bookdown |
if TRUE, uses |
pandoc_args |
arguments passed to the pandoc_args argument of rmarkdown |
md_extensions |
arguments passed to the md_extensions argument of rmarkdown |
mathjax |
set to NULL to disable Mathjax insertion |
... |
Additional function arguments passed to R Markdown |
CSS adapted from the bookdown project, with Roboto family fonts.
R Markdown output format to pass to render