Subset SpatRaster by wavelength range
Arguments
- x
A
SpatRasterwith hyperspectral data. Band names must be numeric wavelengths in nm.- from
Numeric. Start wavelength of the range in nm, inclusive.
- to
Numeric. End wavelength of the range in nm, inclusive.
- filename
Character. Output filename. Default
""keeps result in memory.- overwrite
Logical. Overwrite existing file. Default
FALSE.- ...
Additional arguments passed to
terra::writeRaster().
Value
A SpatRaster with all bands within
the specified wavelength range.
See also
Other Utilities:
hsi_bind_rows(),
hsi_find_extent(),
hsi_subset(),
wavelength_position()
Examples
if (FALSE) { # \dontrun{
x |> hsi_subset_range(from = 660, to = 680)
x |>
hsi_smooth_savgol(m = 1) |>
hsi_subset_range(from = 680, to = 750)
} # }