From 6cb36e35be3782ef27214f002dd52bdba9eef42b Mon Sep 17 00:00:00 2001 From: Rob Marty Date: Thu, 9 May 2024 17:30:25 -0400 Subject: [PATCH] check parameters give error if defaults not entered --- R/blackmarbler.R | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/R/blackmarbler.R b/R/blackmarbler.R index 5775093..e2e33b0 100644 --- a/R/blackmarbler.R +++ b/R/blackmarbler.R @@ -632,6 +632,13 @@ bm_extract <- function(roi_sf, stop("roi must be an sf object") } + # Required parameters used in try statement, so error not generated when used, + # so use them here + roi_sf <- roi_sf + product_id <- product_id + date <- date + bearer <- bearer + # Assign interpolation variables --------------------------------------------- if(interpol_na == T){ if(!exists("method")) method <- "linear" @@ -991,6 +998,13 @@ bm_raster <- function(roi_sf, stop("roi must be an sf object") } + # Required parameters used in try statement, so error not generated when used, + # so use them here + roi_sf <- roi_sf + product_id <- product_id + date <- date + bearer <- bearer + # Assign interpolation variables --------------------------------------------- if(interpol_na == T){ if(!exists("method")) method <- "linear"