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

Use more consistent signature for methods of as.hyperSpec() #16

Open GegznaV opened 3 years ago

GegznaV commented 3 years ago

Currently, each method of as.hyperSpec() uses its own order, default values, and number of arguments:

.as.hyperSpec.matrix <- function(X, wl = NULL, ...)

.as.hyperSpec.data.frame <- function(X, spc = NULL, wl = NULL, labels = attr(X, "labels"), ...)

.as.hyperSpec.hyperSpec <- function(X)

This makes it more difficult to use in other functions as each case should be addressed separately. My suggestions would be to:

May also be related:


This issue originally was: