smix: create a new weighted spectrum

Description Usage Arguments Value

Description

create a new spectrum from numeric weights. the weights can add up to 1 or 100 indicating a plain factor or percentages. if they add up to some other value, indicate via normalize = TRUE, that you want a normalization.

Usage

1
smix(data, weights, normalize = FALSE)

Arguments

data

a data frame containing the spectra to mix. it is assumed the first column contains the Wavelength labels

weights

a 2-col matrix of the spectra to mix. The first column is the column index of the spectrum in data, the second column is the weight of the spectrum

normalize

if the weights should be normalized

Value

a data frame containing with the wavelength labels in the first column and the mixed spectrum in the second


iona5/spectramix documentation built on May 5, 2019, 1:35 a.m.