r-hyperspec / hyperSpec

hyperSpec: Tools for Spectroscopy (R package)
https://r-hyperspec.github.io/hyperSpec/
GNU General Public License v3.0
12 stars 3 forks source link

Improve error message for `[[<-` #100

Open GegznaV opened 1 year ago

GegznaV commented 1 year ago

This is https://github.com/cbeleites/hyperSpec/issues/240


Currently, if [[<- is used, this error is thrown:

flu[[, 3]] <- NA_real_

Error in .local(x, i, j, ..., value = value) : The spectra matrix may only be indexed by i (spectra) and l (wavelengths). j (data column) must be missing.

Improve the message by: