##This Invisible Chunk is required in all CRMDA documents outdir <- paste0("tmpout") if (!file.exists(outdir)) dir.create(outdir, recursive = TRUE) knitr::opts_chunk$set(echo=TRUE, comment=NA, fig.path=paste0(outdir, "/p-")) opts.orig <- options() par.orig <- par(no.readonly=TRUE) options(width = 70)
library(stationery) ## If theme directory does not have required images or TeX files ## we need to retrieve them and put them in "theme" directory. logos <- c("logoleft.png", "logo-vert.png") try(getFiles(logos, pkg = "stationery", overwrite = FALSE)) ## These theme files should be available already, but if not themefiles <- c("kutils.css", "guide-template.html") try(getFiles(themefiles, pkg = "stationery", overwrite = FALSE)) ## If you do not have a file after that, ## the following will manufacture a blank image for a placeholder if(!file.exists("theme/logoleft.png")){ blankPNG(file = "theme/logoleft.png", height=200, width=200, messg = "") } if(!file.exists("theme/logo-vert.png")){ blankPNG(file = "theme/logo-vert.png", height=200, width=200, messg = "") }
This is the template file for Markdown documents prepared with R [@RCore] using the CRMDA template. It was probably created by
library(stationery) initWriteup("rmd2html-guide")
See the "instructions" file with this document.
The instructions document also has a brief reminder about how to specify highlighted call out sections and tabbed sections. Many more details are in the vignette, "HTML_special_features" distributed with the package.
Code chunks for HTML documents were the prototype motivation for the development of R markdown. Chunks will work well.
The usage of R code chunks is discussed in the vignette "code chunks". Some examples are included in the instructions file, in the current directory.
sessionInfo()
if(!is.null(warnings())){ print("Warnings:") warnings() }
## Don't delete this. It puts the interactive session options ## back the way they were. If this is compiled within a session ## it is vital to do this. options(opts.orig) par(par.orig)
Available under Created Commons license 3.0
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.