remove_peaks: Remove features from peak intensity matrix

View source: R/filters.R

remove_peaksR Documentation

Remove features from peak intensity matrix

Description

Filter to remove features.

Usage

remove_peaks(df, rem_index)

Arguments

df

A matrix-like (e.g. an ordinary matrix, a data frame) or RangedSummarizedExperiment-class object with all values of class numeric() or integer() of peak intensities, areas or other quantitative characteristic.

rem_index

logical(), vector containing TRUE vales for features to remove. Should be the same length as number of features in input data.

Value

Object of class SummarizedExperiment. If input data are a matrix-like (e.g. an ordinary matrix, a data frame) object, function returns the same R data structure as input with all value of data type numeric().

Examples

df <- MTBLS79[ ,MTBLS79$Batch == 1]
rem_index <- vector(mode="logical", 
    length=nrow(SummarizedExperiment::assay(df)))
rem_index[c(1, 20, 456, 789)] <- TRUE
out <- remove_peaks(df=df, rem_index=rem_index)


computational-metabolomics/pmp documentation built on March 9, 2024, 4:25 p.m.