::opts_chunk$set(
knitrcache = T
)::shelf(
librarian
tidyverse
, PeruData
, lubridate# , sysfonts
# , showtext
)
The 'cran_repo' argument in shelf() was not set, so it will use
cran_repo = 'https://cran.r-project.org' by default.
To avoid this message, set the 'cran_repo' argument to a CRAN
mirror URL (see https://cran.r-project.org/mirrors.html) or set
'quiet = TRUE'.
::font_add_google("Ubuntu", "regular")
sysfonts# showtext_auto()
<- c(
mlt "https://estadisticas.bcrp.gob.pe/estadisticas/series/diarias/resultados/PD04704XD/html"
"https://estadisticas.bcrp.gob.pe/estadisticas/series/diarias/resultados/PD04703XD/html"
, "https://estadisticas.bcrp.gob.pe/estadisticas/series/diarias/resultados/PD04702XD/html"
, "https://estadisticas.bcrp.gob.pe/estadisticas/series/diarias/resultados/PD04701XD/html"
,
)
Sys.setlocale("LC_ALL", "Spanish")
Warning in Sys.setlocale("LC_ALL", "Spanish"): using locale code page other
than 65001 ("UTF-8") may cause problems
[1] "LC_COLLATE=Spanish_Spain.1252;LC_CTYPE=Spanish_Spain.1252;LC_MONETARY=Spanish_Spain.1252;LC_NUMERIC=C;LC_TIME=Spanish_Spain.1252"
<-
pi bcrp_get(mlt)
Getting data ...
|> head() pi
[[1]]
# A tibble: 6,941 x 2
fecha cotizaciones_internacionales_oro_londres_us_por_onzas_troy
<chr> <chr>
1 02Ene97 366.10
2 03Ene97 362.40
3 06Ene97 357.70
4 07Ene97 359.10
5 08Ene97 356.00
6 09Ene97 356.60
7 10Ene97 359.25
8 13Ene97 358.90
9 14Ene97 356.90
10 15Ene97 354.20
# i 6,931 more rows
[[2]]
# A tibble: 6,941 x 2
fecha cotizaciones_internacionales_zinc_londres_c_us_por_libras
<chr> <chr>
1 02Ene97 46.97
2 03Ene97 47.29
3 06Ene97 47.20
4 07Ene97 47.31
5 08Ene97 47.51
6 09Ene97 47.26
7 10Ene97 47.40
8 13Ene97 47.36
9 14Ene97 48.72
10 15Ene97 49.49
# i 6,931 more rows
[[3]]
# A tibble: 6,941 x 2
fecha cotizaciones_internacionales_plata_h_harman_us_por_onzas_troy
<chr> <chr>
1 02Ene97 4.73
2 03Ene97 4.71
3 06Ene97 4.65
4 07Ene97 4.67
5 08Ene97 4.65
6 09Ene97 4.70
7 10Ene97 4.73
8 13Ene97 4.69
9 14Ene97 4.71
10 15Ene97 4.67
# i 6,931 more rows
[[4]]
# A tibble: 6,941 x 2
fecha cotizaciones_internacionales_cobre_londres_c_us_por_libras
<chr> <chr>
1 02Ene97 102.29
2 03Ene97 104.46
3 06Ene97 104.55
4 07Ene97 105.05
5 08Ene97 108.05
6 09Ene97 107.41
7 10Ene97 109.32
8 13Ene97 111.18
9 14Ene97 111.95
10 15Ene97 109.09
# i 6,931 more rows