The following are from Tom Torsney-Weir’s blog (here’s the repo).
- Simple MathJax and R example
## [1] 2
- A more complex example with caching
1
2
3
| x.vals <- runif(10)
y.vals <- runif(10)
plot(x.vals, y.vals)
|
- Another plotting example using
ggplot
1
2
3
| library(ggplot2)
c <- ggplot(mtcars, aes(y = wt, x = mpg, colour = factor(cyl)))
c + stat_smooth(method = lm) + geom_point()
|
1
2
3
4
5
| suppressPackageStartupMessages(library(googleVis))
## Table with embedded links
PopTable <- gvisTable(Population, options = list(width = 888, height = 450,
page = "enable"))
print(PopTable, "chart")
|