For loop over dygraph does not work in R

Just wrap the list output from lapply() in htmltools::tagList(), e.g.

```{r}
library(dygraphs)
lungDeaths <- cbind(mdeaths, fdeaths)
res <- lapply(1:2, function(i) dygraph(lungDeaths[, i]))
htmltools::tagList(res)
```

Leave a Comment