MissingValues: Missing value replacement

Description Usage Arguments Value Author(s) Examples

View source: R/MissingValues.r

Description

Replaces missing values for large metabolomics data matrices.

Usage

1
2
3
MissingValues(inputdata, column.cutoff=NULL, group.cutoff = NULL,
    complete.matrix = FALSE, seed = 100, 
    saveoutput = FALSE, outputname = "missing.values.rep")

Arguments

inputdata

A data frame in the input data format. See metabolomics for details.

column.cutoff

A value between zero and one. If the proportion of missing values is equal to or more than the column.cutoff in all groups, that whole column will be deleted.

group.cutoff

A value between zero and one. If the proportion of missing values in a group is equal to or more than the group.cutoff, those missing values will be replaced by a random number between zero and the minimum of the entire matrix.

complete.matrix

A logical indicating whether a complete matrix is required. If TRUE, the remaining missing values (preferably only a very few) will be replaced by the average of the abundances in the rest of the group.

seed

An integer, denoting state for random number generation in R.

saveoutput

A logical indicating whether the output should be saved. If TRUE, the results will be saved as a csv file.

outputname

The name of the output file if the output has to be saved.

Value

The output is an object of class metabdata.

Author(s)

Alysha M De Livera, Jairus B Bowne

Examples

1
2
3
4
5
6
7
    mat <- matrix(rnorm(50),
        nr = 5,
        dimnames = list(paste("s", 1:5, sep = ""), paste("m", 1:10, sep = "")))
    mat[, 5] <- NA
    mat[5, 7] <- NA
    inputdata <- data.frame(Group = rep("A", 5), mat)
    MissingValues(inputdata, group.cutoff = 0.7, column.cutoff = 0.8)$output

metabolomics documentation built on May 29, 2017, 3:32 p.m.