imputeMissingVals: Impute NA values in a traces object

Description Usage Arguments Details Value Examples

View source: R/imputeMissingValues.R

Description

Imputes all NA values in a traces object by interpolation.

Usage

1
imputeMissingVals(traces, method = c("mean", "spline"))

Arguments

traces

Object of class traces.

method

Character string, which interpolation method to use.

Details

Unlike with standard imputation methods, missing values on the borders are linearly extrapolated from the neighboring 2 values. Any imputed value below 0 is set to 0.

Value

Object of class traces with imputed NA values.

Examples

1
2
3
4
5
6
7
tracesMiss <- findMissingValues(examplePeptideTraces)
tracesImp <- imputeMissingVals(tracesMiss)
View(tracesImp$traces)

# The imputed values can be visualised using the package 'daff'
require(daff)
render_diff(diff_data(examplePeptideTraces$traces, tracesImp$traces))

CCprofiler/CCprofiler documentation built on May 19, 2021, 7:40 p.m.