Convert spatially resolved object of class hyperSpec to an array.

spcmap2array(x, set_dimnames = FALSE, sort = FALSE)

Arguments

x

A hyperSpec object with variables "x" and "y" in @data.

set_dimnames

logical; specify whether values for x, y and wavelength should be used as dimnames.

sort

logical; specify whether dimensions x (increasing), y (decreasing) and wavelengths (increasing) should be sorted prior conversion.

Value

An array with the dimensions "x" "y" and "nwl", with the wavelength vector attached as an attribute.