You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A student came to me with a problem where he had about a hundred sites and wanted to get climate for a specific period for each site. Currently, if you provide a 'period` vector of the same length as the number of sites (i.e. nrow(coords)), the periods will be recycled, so that each site gets the climate for the whole period vector.
I think it would be nice to be able to provide a data frame with sites/coords and a same-length vector of 'period' desired for each site. But I don't know how easy/feasible that is given current use of 'period'.
Reprex:
library(easyclimate)
df<-data.frame(lon= c(-5, -5),
lat= c(37, 38),
period= c("2010-01-01",
"2020-01-01"))
df#> lon lat period#> 1 -5 37 2010-01-01#> 2 -5 38 2020-01-01out<- get_daily_climate(df, period=df$period, check_connection=FALSE)
#> #> Downloading Prcp data... This process might take several minutesout#> ID_coords period lon lat date Prcp#> 1 1 2010-01-01 -5 37 2010-01-01 0#> 2 1 2010-01-01 -5 37 2020-01-01 0#> 3 2 2020-01-01 -5 38 2010-01-01 0#> 4 2 2020-01-01 -5 38 2020-01-01 0
A student came to me with a problem where he had about a hundred sites and wanted to get climate for a specific period for each site. Currently, if you provide a 'period` vector of the same length as the number of sites (i.e. nrow(coords)), the periods will be recycled, so that each site gets the climate for the whole period vector.
I think it would be nice to be able to provide a data frame with sites/coords and a same-length vector of 'period' desired for each site. But I don't know how easy/feasible that is given current use of 'period'.
Reprex:
Created on 2024-09-25 with reprex v2.1.1
The text was updated successfully, but these errors were encountered: