Другой способ сделать это - использовать пакет purrr
library(bomrang)
library(purrr)
coords <- structure(list(lat = c(-28.01666, -33.8688),
lon = c(153.399994, 151.2093)),
row.names = c(NA, -2L),
class = c("tbl_df", "tbl", "data.frame"))
x <- purrr::map2(.x = coords$lat, .y = coords$lon, .f = ~get_historical(latlon = c(.x, .y), type = "rain"))
#> Closest station: 040764 (GOLD COAST SEAWAY)
#> Data saved as /tmp/RtmpJkn04r/IDCJAC0009_040764_1800_Data.csv
#> Closest station: 066062 (SYDNEY (OBSERVATORY HILL))
#> Data saved as /tmp/RtmpJkn04r/IDCJAC0009_066062_1800_Data.csv
Создано в 2019-05-28 пакетом Представления (v0.2.1)