% Generated by roxygen2: do not edit by hand % Please edit documentation in R/preprocess-spc.R \name{preprocess_spc} \alias{preprocess_spc} \title{Preprocess spectra} \usage{ preprocess_spc(spc_tbl, select, column_in = "spc_mean", custom_function = NULL) } \arguments{ \item{spc_tbl}{Tibble that contains spectra to be preprocessed within a list-column.} \item{select}{Character vector of predefined preprocessing options to be applied to the spectra list-column specified in \code{column_in}. Common prefined values are stated as abbreviated preprocessing methods and options such as \code{"sg_1_w21"}, where \code{"sg"} stands for Savitzky-Golay and \code{1} for first derivative and \code{"w21"} for a window size of 21 points.} \item{column_in}{Character vector of single list-column in \code{spc_tbl} that contain list of spectra (1 row matrix) to be processed by function supplied in \code{select}.} \item{custom_function}{A character string of a custom processing function that is later parsed (produces expression in a list) and evaluated within the function \code{preprocess_spc}. The character vector argument of \code{custom_function} needs to contain \code{"spc_raw"}, which is the single data table of spectra that results from binding a list of data.tables (spectra to preprocess) from the spectra list-column specified in \code{column_in}. An example for a value is \code{"prospectr::savitzkyGolay(X = spc_raw, m = 0, p = 3, w = 9)"}. Optional argument. Default is \code{NULL}.} } \description{ Preprocesses spectra in tibble column by sample_id after averaging spectra by \code{simplerspec::average_spc()}. }