Skip to content

Instantly share code, notes, and snippets.

@pachadotdev
Created July 30, 2020 00:28
Show Gist options
  • Save pachadotdev/75bccbeece712867746ce54df1eee8f9 to your computer and use it in GitHub Desktop.
Save pachadotdev/75bccbeece712867746ce54df1eee8f9 to your computer and use it in GitHub Desktop.
mindicador
library(mindicador)
library(readr)
valoruf <- mindicador_importar_datos(
series = "uf",
anios = 2020,
tipo = "data.frame",
max_intentos = 5,
usar_cache = FALSE,
archivo = NULL
)
variacionuf <- valoruf %>%
mutate(variacion_diaria = valor - lead(valor,1)) %>%
filter(!is.na(variacion_diaria))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment