Full examples and documentation here: https://rstudio.github.io/dygraphs/index.html
Optional code to install from github and install
devtools::install_github("rstudio/dygraphs") library(dygraphs)
Load Library using geneorama, this uses the CRAN version.
geneorama::loadinstall_libraries("dygraphs")
lungDeaths <- cbind(mdeaths, fdeaths) dygraph(lungDeaths)
dygraph(lungDeaths) %>% dySeries("mdeaths", label = "Male") %>% dySeries("fdeaths", label = "Female") %>% dyOptions(stackedGraph = TRUE) %>% dyRangeSelector(height = 20)
p <- dygraph(lungDeaths) p <- dySeries(p, "mdeaths", label = "Male") p <- dySeries(p, "fdeaths", label = "Female") p <- dyOptions(p, stackedGraph = TRUE) p <- dyRangeSelector(p, height = 20) p
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.