Learn R Programming

hyperSpec (version 0.99-20180627)

as.hyperSpec: as.hyperSpec: convenience conversion functions

Description

These functions are shortcuts to convert other objects into hypeSpec objects.

Usage

as.hyperSpec(X, ...)

# S4 method for matrix as.hyperSpec(X, wl = guess.wavelength(colnames(X)), ...)

# S4 method for data.frame as.hyperSpec(X, wl = guess.wavelength(colnames(X)), ...)

Arguments

X

the object to convert

...

additional parameters that should be handed over to new ("hyperSpec") (initialize)

wl

wavelength vector. Defaults to guessing from the column names in X

Value

hyperSpec object

See Also

initialize

Examples

Run this code
# NOT RUN {
tmp <- data.frame(flu [[,, 400 ~ 410]])
(wl <- colnames (tmp))
guess.wavelength (wl)
# }

Run the code above in your browser using DataLab