Philipp Baumann
6 years ago
2 changed files with 77 additions and 0 deletions
@ -0,0 +1,37 @@ |
|||
% Generated by roxygen2: do not edit by hand |
|||
% Please edit documentation in R/plot-spc-extended.R |
|||
\name{merge_dts} |
|||
\alias{merge_dts} |
|||
\title{Merge list-columns of spectra, x-axis values, metadata and additional |
|||
measured variables into a single long form data.table} |
|||
\usage{ |
|||
merge_dts(spc_tbl, lcols_spc = c("spc", "spc_pre"), lcol_measure = NULL, |
|||
spc_id = "unique_id", group_id = "sample_id") |
|||
} |
|||
\arguments{ |
|||
\item{spc_tbl}{Tibble data frame containing spectra, x-axis values, metadata |
|||
and eventual measured variables as list-columns.} |
|||
|
|||
\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. |
|||
} |
|||
\description{ |
|||
Helper function that merges all spectra and related data into |
|||
a single long form data.table than can subsequently be used for plotting. |
|||
} |
@ -0,0 +1,40 @@ |
|||
% 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}}. |
|||
} |
Loading…
Reference in new issue