Streamlining spectral data processing and modeling for spectroscopy applications
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.2 KiB

% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/average-spectra.R
\name{average_spectra}
\alias{average_spectra}
\title{Calculate mean of spectra}
\usage{
average_spectra(in_spectra)
}
\arguments{
\item{in_spectra}{List that contains spectral data in the
element \code{MIR} (data.frame) and sample metadata in the
list element \code{data_rep} (data.frame).
The data.frame \code{data_meta}
contains the sample ID stored in the \code{ID}
vector (originally from spectral file names),
country abbreviation stored in \code{contry} (2 letters),
and the vector \code{site} (2 letters) that is the country
abbreviation.}
}
\value{
\code{out_spectra}: List that contains:
\itemize{
\item \code{data_meta}: metadata of sample (data.frame)
that is
taken from the element \code{rep} of the input list argument
\code{in_spectra}
\item \code{MIR_mean}: average spectra from replicates of
sample ID
(data.frame)
\item \code{MIR_sd}: standard deviation of spectra calculated
from replicates of sample ID (data.frame)
\item \code{cvar} coefficient of variance over all
wavenumbers of spectra
calculated from replicates of sample ID (vector)
}
}
\description{
Calculate the mean of each spectral repetitions
(absorbance average per wavenumber)
}