Package 'knitrBootstrap'

Title: 'knitr' Bootstrap Framework
Description: A framework to create Bootstrap <http://getbootstrap.com/> HTML reports from 'knitr' 'rmarkdown'.
Authors: Jim Hester
Maintainer: Jim Hester <[email protected]>
License: MIT + file LICENSE
Version: 1.0.3
Built: 2024-12-03 03:56:53 UTC
Source: https://github.com/jimhester/knitrBootstrap

Help Index


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

render


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.


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 knit

See Also

knit_bootstrap_md


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


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 http://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)

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.