(View source here: https://gist.github.com/mkcor/1ca67262c74c590bd6e9)
This is an R Markdown document. Markdown is a simple formatting syntax for authoring documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
You can embed an R code chunk like this:
summary(cars)
## speed dist
## Min. : 4.0 Min. : 2.00
## 1st Qu.:12.0 1st Qu.: 26.00
## Median :15.0 Median : 36.00
## Mean :15.4 Mean : 42.98
## 3rd Qu.:19.0 3rd Qu.: 56.00
## Max. :25.0 Max. :120.00
You can also embed plots, for example:
library(plotly)
## Loading required package: RCurl
## Loading required package: bitops
## Loading required package: RJSONIO
## Loading required package: ggplot2
gg <- ggplot(cars) + geom_point(aes(speed, dist))
gg
py <- plotly()
py$ggplotly(gg, session="knitr", kwargs=list(filename="cars_knitr",
fileopt="overwrite"))
You can embed a static plot using Markdown syntax:
Notice that we simply appended a supported extension (.png) to the URL where the plotly plot lives.
You can also use HTML syntax to embed iframes: