powered by
`[<-` assigns the rhs values to spectra
`[<-`
# S3 method for spectra [(x, i, j) <- value
nothing. modifies spectra as side effect
spectra object (lhs)
Sample names (preferred), index, or a logical vector of length nrow(x)
band labels, as numeric or character or a logical vector of length ncol(x). Do not use indexes!
value to be assigned (rhs). Must either data coercible to numeric or another `spectra` obj
Jose Eduardo Meireles
library(spectrolab) spec = as_spectra(spec_matrix_example, name_idx = 1) spec[ , 400:500] = spec[ , 400:500] * 1.2 spec
Run the code above in your browser using DataLab