w4m_filter_zero_imputation: Impute missing values to zero for W4M data matrix

Description Usage Arguments Value Author(s) See Also Examples

Description

Substitute zero for missing or negative intensity values in W4M data matrix

Usage

1

Arguments

m

matrix: W4M data matrix potentially containing NA or negative values

Value

matrix: input data matrix with zeros substituted for negative or NA values

Author(s)

Art Eschenlauer, esch0041@umn.edu

See Also

https://github.com/HegemanLab/w4mclassfilter

http://workflow4metabolomics.org/

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# input contains negative and missing values
my_input <- matrix(c(NA,1,-1,2), ncol = 2, nrow = 2)

# expected output converts negative and missing values to zero
my_expected <- matrix(c(0,1,0,2), ncol = 2, nrow = 2)

# run the imputation method to generate actual output
my_output <- w4m_filter_zero_imputation(my_input)

# validate actual output against expected output
all.equal(my_output, my_expected, check.attributes = FALSE)

HegemanLab/w4mclassfilter documentation built on March 14, 2021, 1:19 a.m.