bluegreen-labs / daymetr

An R Interface to the Daymet Web Services
http://bluegreen-labs.github.io/daymetr/
Other
30 stars 17 forks source link

New function to find max year #34

Closed khufkens closed 1 month ago

khufkens commented 5 years ago

end <- as.numeric(format(as.Date(Sys.Date()),"%Y"))

daymet_test <- TRUE

while (inherits(daymet_test,"try-error")){ daymet_test <- try(daymetr::download_daymet( start = end, end = end, internal = TRUE, silent = TRUE)) end = end - 1 }

return(end)