Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error message for [[<- #240

Closed
GegznaV opened this issue Aug 3, 2020 · 1 comment
Closed

Improve error message for [[<- #240

GegznaV opened this issue Aug 3, 2020 · 1 comment
Labels

Comments

@GegznaV
Copy link
Collaborator

GegznaV commented Aug 3, 2020

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:

  • providing a more exact place where the error occurred (i.e., not .local(...) is not informative enough for users).
  • add an example in the message, how to fix (e.g. instead of, e.g., x[[, 20]] <- 1, use x[[, , 20]] <- 1)
@GegznaV
Copy link
Collaborator Author

GegznaV commented Aug 6, 2022

Moved to r-hyperspec/hyperSpec#100

@GegznaV GegznaV closed this as completed Aug 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant