smix_by_names: create a new weighted spectrum with spectrum names

Description Usage Arguments Value

Description

a convenience function to create a new spectrum from named 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_by_names(data, weights_df, normalize = FALSE)

Arguments

data

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

weights_df

a 1-row data frame with the weights. the column names are the names of the spectra to be mixed from data. the row itself contains its weights

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.