Skip to content

Commit

Permalink
check parameters give error if defaults not entered
Browse files Browse the repository at this point in the history
  • Loading branch information
ramarty committed May 9, 2024
1 parent 0619b35 commit 6cb36e3
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions R/blackmarbler.R
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 6cb36e3

Please sign in to comment.