Learn R Programming

MetStaT (version 1.0)

MetStaT.RemoveNaColumns: Removes all columns in a matrix that contain one or more NAs.

Description

This function will check per column whether any of its values are NA. If so, that column is removed from the resulting output matrix.

Usage

MetStaT.RemoveNaColumns(input.matrix, rows.to.ignore = NULL)

Arguments

input.matrix
the matrix to be checked for columns containing NA values.
rows.to.ignore
a vector of row-indices which will exclude those rows when checking for NA values.

Value

The same matrix as the input matrix, with the exception of the any columns that contain NA values (ignoring any rows defined by the user).