S4 method for the generic function diff() and the hyperSpec class.

# S4 method for hyperSpec
diff(x, lag = 1, differences = 1)

Arguments

x

a numeric vector or matrix containing the values to be differenced.

lag

an integer indicating which lag to use.

differences

an integer indicating the order of the difference.

Value

a hyperSpec object.

Details

All columns of x@data$spc are kept and spectra padded with NAs accordingly.

See also

Examples

if (FALSE) { plotspc(diff(chondro, 1, 1)) }