Extract spatial and/or spectral subsets from a cube. Subsetting preserves
the hsi_cube class.
Arguments
- x
An hsi_cube object.
- i
Row indices (spatial).
- j
Column indices (spatial).
- k
Band indices (spectral).
- ...
Additional arguments (ignored).
Value
A subsetted hsi_cube object.
Examples
cube <- hs_example_cube()
sub <- cube[1:10, 1:10, 1:5]
dim(sub)
#> [1] 10 10 5