README.md

rmarkdown.helpers package

Description

Collection of helpers for rmarkdown.

Installation

devtools::install_github('kjedrzejewski/rmarkdown.helpers')

Functions

embed_htmlwidget(widget, rasterise = F)

Converts htmlwidgets to a form that may be correctly embedded in the output document, depending on its type. Requires webshot and EBImage packages.

You may install webshot using following code:

devtools::install_github("wch/webshot")
webshot::install_phantomjs() # Not required if you have PhantomJS already installed in your system

You may install EBImage using following code:

source("https://bioconductor.org/biocLite.R")
biocLite("EBImage")

Example

library(htmlwidgets)
library(wordcloud2)
w = wordcloud2(demoFreq, size = 1, shape = 'star')
embed_htmlwidget(w, rasterise = T)


kjedrzejewski/rmarkdown.helpers documentation built on May 20, 2019, 10:25 a.m.