Description Usage Arguments Value See Also Examples
draftRmdHTML copies a standard R Markdown (to HTML)
document template while allowing for dynamic insertion and styling of an
image (logo)
1 2 | draftRmdHTML(dir, logoFile, width, height, moreLogoCSS = "",
recursive = FALSE)
|
dir |
character value; directory to store template files |
logoFile |
character value; path to image file to embed |
width |
integer; styling width (in pixels) to use on embedded image |
height |
integer; styling height (in pixels) to use on embedded image |
moreLogoCSS |
character value; additional CSS to use on embedded image |
recursive |
logical value; should elements of |
A logical value indicating the success (or failure) of copying the
template files. If dir does not exist, its creation will be
attempted. Template files are then copied to dir. Appropriate
modifications are then made to template files based on logoFile,
width, height and moreLogoCSS.
file.copy, readTemplate, image_uri
1 2 3 4 5 6 7 8 9 10 11 | dir.create("test")
download.file("http://cran.us.r-project.org/Rlogo.svg", "test/Rlogo.svg")
draftRmdHTML("test", "test/Rlogo.svg", 148, 115, "margin-top: 20px;")
rmarkdown::render("test/template.Rmd")
dir.create("test2")
download.file(
"https://www.rstudio.com/wp-content/uploads/2014/06/RStudio-Ball.png",
"test2/RStudio-Ball.png"
)
draftRmdHTML("test2", "test2/RStudio-Ball.png", 150, 150)
rmarkdown::render("test2/template.Rmd")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.