Using the package htmltools, insert two dygraphin tagListand use the function browsable()to plot both graphs in the viewer:
library(dygraphs)
library(htmltools)
browsable(
tagList(
dygraph(mdeaths, group = "ensync", height = 200, width = "100%"),
dygraph(fdeaths, group = "ensync", height = 200, width = "100%")
)
)
Perhaps the code is more readable using the magrittrforward-pipe statement :
library(dygraphs)
library(htmltools)
library(magrittr)
dygraph(mdeaths, group = "ensync", height = 200, width = "100%") %>%
tagList(dygraph(fdeaths, group = "ensync", height = 200, width = "100%")) %>%
browsable()