Skip to content

Commit

Permalink
Fix argument name in stretch_raster...
Browse files Browse the repository at this point in the history
  • Loading branch information
mzarowka committed Sep 4, 2024
1 parent 8cf9b5c commit 8a1b079
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions R/plotting.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
#'
#' @family Plotting
#' @param raster a SpatRaster, preferably reflectance file.
#' @param ext character, a graphic format extension.
#' @param extension character, a graphic format extension, defaults to "tif".
#' @param write logical, should resulting SpatRaster be written to file.
#'
#' @export
stretch_raster_full <- function(
raster,
ext = NULL,
extension = NULL,
write = TRUE) {

# Check if correct class is supplied.
Expand All @@ -28,7 +28,11 @@ stretch_raster_full <- function(
fs::path_ext_remove()

# Prepare name
if (is.null(filename) == TRUE) {
filename <- paste0(raster_src, "/RGB_", raster_name, ".tif")
} else {
filename <- paste0(raster_src, "/RGB_", raster_name, ".", ext)
}

# Check if there are values close to RGB, within the 25 nm.
if (all(any(purrr::list_c(purrr::map(c(450, 550, 650), \(i) dplyr::near(i, as.numeric(names(raster)), tol = 25))))) == TRUE) {
Expand Down
4 changes: 2 additions & 2 deletions man/stretch_raster_full.Rd

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

0 comments on commit 8a1b079

Please sign in to comment.