Skip to content

Commit

Permalink
Fix bug where multiple years fail check in year range
Browse files Browse the repository at this point in the history
  • Loading branch information
adamhsparks committed Jan 14, 2025
1 parent 951fd2f commit 0fac645
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion R/get_chirts.R
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ get_chirts.SpatExtent <- function(object, dates, var, as.raster = TRUE, ...){

# year range
yrange <- seq(1983, 2016, 1)
if (unique(years) %notin% yrange) {
if (any(unique(years) %notin% yrange)) {
stop(call. = FALSE,
"CHIRTS data is currently available from 1983 to 2016. ",
"Soon available to near-present.")
Expand Down
1 change: 1 addition & 0 deletions chirps.Rproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Version: 1.0
ProjectId: c21b96f2-cc6e-4f20-94ac-d2da6c626fe1

RestoreWorkspace: Default
SaveWorkspace: No
Expand Down

0 comments on commit 0fac645

Please sign in to comment.