hyperSpec objects can use the base functions base::colMeans(), base::colSums(), base::rowMeans() and base::rowSums().

# S4 method for hyperSpec
colMeans(x, na.rm = TRUE, ..., label.spc)

# S4 method for hyperSpec
colSums(x, na.rm = TRUE, ..., label.spc)

# S4 method for hyperSpec
rowMeans(x, na.rm = TRUE, ..., label.wavelength)

# S4 method for hyperSpec
rowSums(x, na.rm = TRUE, ..., label.wavelength)

Arguments

x

hyperSpec object.

na.rm, ...

Further parameters to the base functions.

na.rm defaults to TRUE for hyperSpec objects.

label.spc

Labels for the intensity axis for loadings-like (col) statistics.

label.wavelength

Labels for the wavelength axis for scores-like (row) statistics.

See also

Examples

colMeans(flu)
#> hyperSpec object
#>    1 spectra
#>    1 data columns
#>    181 data points / spectrum
colSums(flu)
#> hyperSpec object
#>    1 spectra
#>    1 data columns
#>    181 data points / spectrum
colSums(flu)
#> hyperSpec object
#>    1 spectra
#>    1 data columns
#>    181 data points / spectrum
rowSums(flu)
#> hyperSpec object
#>    6 spectra
#>    3 data columns
#>    1 data points / spectrum