You may have to install the development version of the animation package from Github:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass{article} | |
\begin{document} | |
We can draw a table with the gridExtra package, and one problem is to | |
pre-determine the size of the table plot to remove the extra white | |
margin. Below is an example that shows you how to do it (courtesy of | |
baptiste auguie). | |
<<setup>>= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: HTML Dependencies | |
output: html_document | |
--- | |
This example explains how HTML dependencies work in **htmltools**. Sometimes an HTML fragment may have additional dependencies to work correctly, such as JavaScript and/or CSS files. In R Markdown documents, you have to let **rmarkdown** know these dependencies, so they can be added to the HTML header when the document is rendered through Pandoc. | |
Another thing that you need to pay attention is you have to "protect" your HTML output so that Pandoc does not touch it, e.g. when you have four leading spaces, Pandoc may think this line is supposed to be a `<pre>` block whereas you only meant to indent the line for cosmetic purposes. In this case, the function `htmltools::htmlPreserve()` will be _automatically_ applied to your HTML content in R Markdown if the content is generated from `htmltools::tags` or wrapped in `htmltools::HTML()`. | |
Now we use a random CSS file in the **knitr** package to illustrate how dependencies work. The goal here is to generate a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass{beamer} | |
\usepackage{url} | |
\begin{document} | |
<<setup, include=FALSE, tidy=FALSE, highlight=FALSE>>= | |
# do not use the highlight package; will do it manually | |
opts_chunk$set(highlight = FALSE, tidy = FALSE) | |
tokens = c('dlmMLE', 'dlmModReg') # a list of words to be highlighted by structure{} | |
knit_hooks$set( | |
chunk = function(x, options) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass{article} | |
\begin{document} | |
<<run-all, results='hide', message=FALSE>>= | |
library(xtable) | |
out = NULL | |
for (g in unique(mtcars$gear)) { | |
out = c(out, knit_child('template.Rnw', sprintf('gear-%s.tex', g))) | |
} |
title: "Show Your Webcam in R Markdown Presentations" author: "Yihui Xie" date: "2015/10/25" output: slidy_presentation: incremental: yes duration: 40 footer: "Webcam in R Markdown, Yihui Xie, 2015" includes:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass{article} | |
\begin{document} | |
<<setup, include=FALSE, cache=FALSE>>= | |
library(knitr) | |
library(ggplot2) | |
@ | |
\title{Knitr and ggplot2} | |
\author{Daniel Haugstvedt} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stopifnot(getRversion() > '3.0.1') | |
par("page") | |
dev.off() | |
dev.new() | |
par("page") | |
plot(1) | |
par("page") |
These 498 packages are currently affected by the check of :::
on CRAN:
AER
BLCOP
BSagri
BatchExperiments
BatchJobs
BayHap
BayesFactor