The following functions for hyperSpec
objects:
All these functions work on the spectra matrix.
# S4 method for hyperSpec
Summary(x, ..., na.rm = FALSE)
# S4 method for hyperSpec
is.na(x)
all_wl(expression, na.rm = FALSE)
any_wl(expression, na.rm = FALSE)
hyperSpec object
further objects
logical indicating whether missing values should be removed
expression that evaluates to a logical matrix of the same size as the spectra matrix
sum
, prod
, min
, max
, and range
return a numeric,
all
, any
, and is.na
a logical.
all_wl()
and any_wl()
are shortcut function to check whether
any or all intensities fulfill the condition per spectrum.
na.rm
behavior is like base::all()
and base::any()
.
base::Summary()
for the base summary functions.
range(flu)
#> [1] 27.1500 677.4947
is.na(flu[, , 405 ~ 410])
#> 405 405.5 406 406.5 407 407.5 408 408.5 409 409.5 410
#> [1,] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
#> [2,] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
#> [3,] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
#> [4,] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
#> [5,] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
#> [6,] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
all_wl(flu > 100)
#> [1] FALSE FALSE FALSE TRUE TRUE TRUE
any_wl(flu > 300)
#> [1] FALSE FALSE TRUE TRUE TRUE TRUE
!any_wl(is.na(flu))
#> [1] TRUE TRUE TRUE TRUE TRUE TRUE