Skip to content

Improve error message for [[<- #240

Closed

Description

@GegznaV

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)

Activity

  1. GegznaV commented on Aug 6, 2022

    @GegznaV
    CollaboratorAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority: 3-lowType: enhancement 🎈

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions