[<-.spectra | R Documentation |
`[<-`
assigns the rhs values to spectra
## S3 replacement method for class 'spectra' x[i, j] <- value
x |
spectra object (lhs) |
i |
Sample names (preferred), index, or a logical vector of length nrow(x) |
j |
band labels, as numeric or character or a logical vector of length ncol(x). Do not use indexes! |
value |
value to be assigned (rhs). Must either data coercible to numeric or another 'spectra' obj |
nothing. modifies spectra as side effect
Jose Eduardo Meireles
library(spectrolab) spec = as_spectra(spec_matrix_example, name_idx = 1) spec[ , 400:500] = spec[ , 400:500] * 1.2 spec
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.