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.

45 lines
1.7 KiB

% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot-spc-extended.R
\name{merge_dts_l}
\alias{merge_dts_l}
\title{Wrapper function around \code{merge_dts()} for list of tibbles to
aggregate data for plotting.}
\usage{
merge_dts_l(
spc_tbl_l,
lcols_spc = c("spc", "spc_pre"),
lcol_measure = NULL,
spc_id = "unique_id",
group_id = "sample_id"
)
}
\arguments{
\item{spc_tbl_l}{List of spectral tibbles (data frames).}
\item{lcols_spc}{Character vector of spectral list-columns to be extracted.
Default is \code{c("spc", "spc_pre")} (raw and preprocessed spectra).}
\item{lcol_measure}{Character vector of length 1 denoting the column name
of the measure columns. This argument is optional. Default is \code{NULL},
which does not extract an additional measure column.}
\item{spc_id}{Character vector of column that contains a unique spectral
identifier for all spectra. Default is \code{"unique_id"}.}
\item{group_id}{Character vector of columns that is used assigning spectra
into groups. Default is \code{"sample_id"}. The \code{group_id} can be
used for later plotting and thereby visually separating spectral groups into
using different colors or panels.}
}
\value{
A single data.table containing long form aggregated data of
spectra, x-axis values, metadata and an additionally measured variable.
An additional column called \code{group_id_tbl} is appended. It denotes
the name of the spectral tibble supplied with the list \code{spc_tbl_l}.
}
\description{
Instead of a single spectral tibble (data frame) multiple
spectral tibbles can be merged into a long-form data.table for plotting
spectra and related data. For details, see
\code{\link{merge_dts}}.
}