Version: | 1.0.3 |
Maintainer: | Jim Hester <james.f.hester@gmail.com> |
Author: | Jim Hester |
Title: | 'knitr' Bootstrap Framework |
Description: | A framework to create Bootstrap https://getbootstrap.com/ HTML reports from 'knitr' 'rmarkdown'. |
Depends: | R (≥ 3.0.0) |
Imports: | knitr (≥ 1.5.25), rmarkdown, markdown |
Suggests: | testthat, roxygen2, corrplot, ggplot2, igraph, maps, mapproj, plyr, reshape2, xtable |
License: | MIT + file LICENSE |
URL: | https://github.com/jimhester/knitrBootstrap#readme |
BugReports: | https://github.com/jimhester/knitrBootstrap/issues |
VignetteBuilder: | knitr |
RoxygenNote: | 6.0.1 |
NeedsCompilation: | no |
Packaged: | 2024-02-06 19:40:37 UTC; jimhester |
Repository: | CRAN |
Date/Publication: | 2024-02-06 20:00:02 UTC |
knitrBootstrap A framework to create Bootstrap 3 HTML reports from knitr
Rmarkdown.
Knitr Bootstrap includes a bootstrap_document
custom
rendering function for use with the rmarkdown
https://rmarkdown.rstudio.com/) package.
Description
You can also specify the options in your YAML front-matter, see the rmarkdown documentation for examples.
Examples
## Not run:
library(rmarkdown)
library(knitrBootstrap)
render('input.Rmd', bootstrap_document())
#with some options
render('input.Rmd', bootstrap_document(title='Test', highlight='Github',
theme='Slate', theme.chooser=TRUE, highlight.chooser=TRUE))
## End(Not run)
Add the knitrBootstrap html header to an HTML file produced by knitr.
Description
This function includes the knitrBootstrap HTML headers to wrap the knitr output in bootstrap styled HTML.
Usage
bootstrap_HTML(input, output = NULL)
Arguments
input |
html filename to be wrapped with Bootstrap. |
output |
html filename to output. |
Convert to a Bootstrap styled HTML document
Description
rmarkdown Format for converting from R markdown to Bootstrap styled HTML
Usage
bootstrap_document(title = NULL, theme = "default",
highlight = "highlightjs", theme.chooser = FALSE,
highlight.chooser = FALSE, menu = TRUE, custom.header = NULL,
clean_supporting = TRUE)
Arguments
title |
Title to use in the bootstrap document |
theme |
Visual theme ('Default', 'Amelia', 'Cerulean', 'Cosmo', 'Cyborg', 'Journal', 'Flatly', 'Readable', 'Simplex', 'Slate', 'Spacelab', 'United'). |
highlight |
Syntax highlighting style ('HighlightJs', 'Dark', 'Far', 'Idea', 'Sunburst', 'Zenburn', 'Visual Studio', 'Ascetic', 'Magula', 'Github', 'Google Code', 'Brown Paper', 'School Book', 'IR Black', 'Solarized - Dark', 'Solarized - Light', 'Arta', 'Monokai', 'Xcode', 'Pojoaque', 'Rainbow', 'Tomorrow', 'Tomorrow Night', 'Tomorrow Night Bright', 'Tomorrow Night Blue', 'Tomorrow Night Eighties'). |
theme.chooser |
Adds a dynamic theme chooser to the page, pass 'TRUE' to include. |
highlight.chooser |
Adds a dynamic highlight chooser to the page, pass 'TRUE' to include. |
menu |
Whether to show the menu or not. |
custom.header |
HTML file containing any extra header logic such as external script or CSS includes. |
clean_supporting |
Whether to clean supporting files or not. |
See Also
knit a Rmd file and wrap it in bootstrap styles
Description
This function includes the knitrBootstrap HTML headers to wrap the knitr output in bootstrap styled HTML.
Usage
knit_bootstrap(input, output = NULL, ...)
Arguments
input |
Rmd input file to knit into HTML |
output |
HTML output file created, if NULL uses the input filename with the extension changed to .html |
... |
options passed to |
See Also
knit a md file and wrap it in bootstrap styles
Description
This function includes the knitrBootstrap HTML headers to wrap the knitr output in bootstrap styled HTML.
Usage
knit_bootstrap_md(input, output = NULL)
Arguments
input |
md input file to be converted to HTML' |
output |
HTML output file created, if NULL uses the input filename with the extension changed to .html |
See Also
knit_bootstrap
knit
,
markdownToHTML
Set knitr bootstrap output functions
Description
This function sets the appropriate knitr output hooks to produce a bootstrap styled report.
Usage
render_bootstrap()
Details
This will allow use of the knitr bootstrap output hooks without the rmarkdown package. Note you still need to use pandoc to generate the HTML document, as the sundown library in the markdown package cannot handle markdown embedded in HTML tags, which knitr bootstrap uses.