Learn R Programming

geoSpectral (version 0.17.5)

spc.interp.spectral: Interpolate spectral values

Description

Estimate spectral data at a new set of wavelengths through interpolation using approx().

Usage

spc.interp.spectral(source1,target_lbd,show.plot, ...)

# S4 method for Spectra spc.interp.spectral(source1, target_lbd, show.plot = FALSE)

Arguments

source1

A Spectra object

target_lbd

numeric vector giving desired wavelengths

show.plot

logical TRUE if a graphical representation is required

...

further arguments to pass on to approx().

Examples

Run this code
# NOT RUN {
sp=spc.example_spectra()
lbd = as.numeric(c(412,440,490,555,670))
sp2 = spc.interp.spectral(sp[,lbd],c(430,450,500))
spc.plot.overlay(SpcList(list(sp,sp2)))

#Quick Plot only the first row
spc.interp.spectral(sp[,lbd],c(430,450,500),show.plot=TRUE)

# }

Run the code above in your browser using DataLab