Introducción a R: Gráficos interactivos con dygraphs

R
Autor/a

Pedro L. Luque

Fecha de modificación

1 de febrero de 2025

Palabras clave

R básico, Gráficos interactivos

1 Gráficos interactivos con dygraphs

library(dygraphs)
lungDeaths <- cbind(mdeaths, fdeaths)
dygraph(lungDeaths) %>%
  dyOptions(colors = RColorBrewer::brewer.pal(3, "Set2"))
lungDeaths <- cbind(mdeaths, fdeaths)
dygraph(lungDeaths, main = "Deaths from Lung Disease (UK)") %>%
  dyRangeSelector() %>%
  dyOptions(colors = RColorBrewer::brewer.pal(3, "Set2"))
dygraph(lungDeaths, main = "Deaths from Lung Disease (UK)") %>%
  dyOptions(fillGraph = TRUE, fillAlpha = 0.4) %>%   
  dyRangeSelector()