Skip to content

Commit

Permalink
Add overwrite option (#70)
Browse files Browse the repository at this point in the history
* Add overwrite option

* Document
  • Loading branch information
mikemahoney218 authored Jun 24, 2024
1 parent af10855 commit e7b12c5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# rsi (development version)

* `calculate_indices()` gains a new argument, `overwrite`, which is passed
directly to `terra::predict()`. Thanks to @Cidree in #69 (#70).

* `stack_rasters()` gains a new argument, `check_crs`, which can be set to `FALSE`
to skip checking if all rasters share the same CRS.

Expand Down
5 changes: 4 additions & 1 deletion R/calculate_indices.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ calculate_indices <- function(raster,
...,
cores = 1L,
wopt = list(),
overwrite = FALSE,
extra_objects = list(),
names_suffix = NULL) {
rlang::check_dots_empty()
Expand Down Expand Up @@ -117,6 +118,7 @@ calculate_indices <- function(raster,
output_filename = output_filename,
wopt = wopt,
cores = cores,
overwrite = overwrite,
names_suffix = names_suffix
)

Expand Down Expand Up @@ -160,7 +162,8 @@ calculate_indices <- function(raster,
},
filename = output_filename,
wopt = wopt,
cores = cores
cores = cores,
overwrite = overwrite
)
},
envir = exec_env
Expand Down
3 changes: 3 additions & 0 deletions man/calculate_indices.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e7b12c5

Please sign in to comment.