Skip to content

Commit

Permalink
silence try() #309
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanbeaudette committed Oct 3, 2023
1 parent fd42e57 commit 4e384cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/ISSR800.R
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,10 @@ ISSR800.wcs <- function(aoi, var, res = 800, quiet = FALSE) {
if (!is.null(var.spec$rat)) {

# get rat
rat <- try(read.csv(var.spec$rat, stringsAsFactors = FALSE), silent = quiet)
rat <- try(suppressWarnings(read.csv(var.spec$rat, stringsAsFactors = FALSE)), silent = TRUE)

if (inherits(rat, 'try-error')) {
message("Failed to download RAT from ", var.spec$rat, "; returning non-categorical grid")
message("\nFailed to download RAT from ", var.spec$rat, "; returning integer grid")
return(r)
}

Expand Down

0 comments on commit 4e384cf

Please sign in to comment.