Learn R Programming

hyperSpec (version 0.100.2)

guess.wavelength: guess wavelengths from character vector

Description

character vectors used for names (e.g. colnames for matrices or data.frames) are often treated by make.names or similar functions that produce suitable names (e.g. by prepending "X" to numbers.). Such names cannot be directly converted to numeric.

Usage

guess.wavelength(X)

Value

numeric

Arguments

X

character with numbers hidden inside

Details

guess.wavlength tries to extract numbers from X which may be surrounded by such "protecting" characters.

Examples

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

Run the code above in your browser using DataLab