Do some basic checks on a given data matrix

Share:

Description

Check a given data matrix for consistency with the format required for further analysis. The data must be a numeric matrix and not contain:

  • Inf values

  • NaN values

  • Rows or columns that consist of NA only

Usage

1
checkData(data, verbose = FALSE)

Arguments

data

matrix – Data to check.

verbose

boolean – If TRUE, the function prints messages whenever an error in the data set is found.

Value

isValid

boolean – TRUE if no errors were found, FALSE otherwise. isValid contains a set of attributes, these are:

  • isNumeric - TRUE if data is numeric, false otherwise

  • isInfinite - TRUE if data contains 'Inf' values, false otherwise

  • isNaN - TRUE if data contains 'NaN' values, false otherwise

  • isMatrix - TRUE if the data is in matrix format, FALSE otherwise

  • naRows - TRUE if data contains rows in which all elements are 'NA', FALSE otherwise

  • naCols - TRUE if data contains columns in which all elements are 'NA', FALSE otherwise

Author(s)

Wolfram Stacklies

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.