From 4e384cf91b50a5b11c07b1faa4447c7bfd9da59d Mon Sep 17 00:00:00 2001 From: Beaudette Date: Tue, 3 Oct 2023 14:31:27 -0700 Subject: [PATCH] silence try() #309 --- R/ISSR800.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/ISSR800.R b/R/ISSR800.R index 1bf72af1..cf4b0e1e 100644 --- a/R/ISSR800.R +++ b/R/ISSR800.R @@ -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) }