codes <- c("PN00009MM", "PN00002MM", "PN01270PM", "PD39557DA")
# Will get you the most recent data for these codes
# as you have not provided the `from` and `to` arguments.
get_bcrp_data(codes = codes)
# You can also provide the range of dates
# through the `from` and `to` arguments.
get_bcrp_data(codes = codes, from = "2015-01", to = "2020-01")
# If needed, you can sometimes speed up your data API calls
# by performing them in parallel. In this example we are
# querying just 5 codes so the benefits of parallelism does not
# outweigh its cost, making the request slower.
if (FALSE) {
get_bcrp_data(codes = codes, request_strategy = "parallel")
}
Run the code above in your browser using DataLab