The functions
all
, any
,
sum
, prod
,
min
, max
,
range
, and
is.na
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)
x | hyperSpec object |
---|---|
... | further objects |
na.rm | logical indicating whether missing values should be removed |
expression | 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
behaviour is like base::all()
and base::any()
.
base::Summary()
for the base summary functions.
range(flu)#> [1] 27.1500 677.4947#> 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 FALSEall_wl(flu > 100)#> [1] FALSE FALSE FALSE TRUE TRUE TRUEany_wl(flu > 300)#> [1] FALSE FALSE TRUE TRUE TRUE TRUE#> [1] TRUE TRUE TRUE TRUE TRUE TRUE