cast_matrix_to_numeric: Cast a matrix of any type to numeric

Description Usage Arguments Value Examples

View source: R/cast_matrix_to_numeric.R

Description

Transforms values in the expression matrix to numeric, to make it compatible with the rest of the functions.

Usage

1
cast_matrix_to_numeric(expression.matrix)

Arguments

expression.matrix

The expression matrix (usually read from a file)

Value

The expression matrix transformed to numeric, preserving row and column names. Any values that are not coercible to numeric are replaced by 0.

Examples

1
2
3
4
5
cast_matrix_to_numeric(matrix(
    c(1, "2", 3.0, 4),
    ncol=2,
    dimnames=list(paste0("X", 1:2),
                  paste0("Y", 1:2))))

noisyr documentation built on April 16, 2021, 5:07 p.m.