Skip to content

Creating hyperSpec object without wavelengths #296

Closed

Description

@cbeleites

This is the "transpose" of issue #288: creating a hyperSpec object where the spectra do not (yet) exist.

Suggested:

new("hyperSpec", data = data.frame(c = 1:5))

this works:

new("hyperSpec",
     wavelength = numeric(0),
     spc = matrix(NA_real_, ncol = 0, nrow = 5), 
     data = data.frame(c = 1:5)
)

Activity

  1. GegznaV commented on Dec 23, 2020

    @GegznaV
    Collaborator

    I've solved this on my PC, just did not want to create too many PR before the current ones are reviewed.

  2. added
    Type: enhancement 🎈
    on Dec 23, 2020
  3. GegznaV commented on Dec 23, 2020

    @GegznaV
    Collaborator

    To clarify, I have suggestion for:

    new("hyperSpec", data = data.frame(c = 1:5))
  4. GegznaV commented on Dec 23, 2020

    @GegznaV
    Collaborator

    I ran unit tests on my implementation and understood that the issue is more complex than it seemed at first glance.

    Currently, the official solution to this issue in hyperSpec is to use as.hyperSpec():

    as.hyperSpec(data.frame(c = 1:5))
    as.hyperSpec(as.matrix(data.frame(c = 1:5)))
    as.hyperSpec(matrix(1:5))
  5. GegznaV commented on Aug 6, 2022

    @GegznaV
    Collaborator

    Issue reopened as r-hyperspec/hyperSpec#99

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

    Type: enhancement 🎈

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions