data.numericmatrix: Convert data.frame columns to numeric

View source: R/DataProcessing.R

data.numericmatrixR Documentation

Convert data.frame columns to numeric

Description

The data.numericmatrix() function works similar to base::data.matrix() before R-4.0.0 converting character columns to numeric without converting to factor first, thus returning the actual numeric values.

Usage

data.numericmatrix(x)

Arguments

x

The data.frame to convert

Value

A matrix with all columns converted to numeric

Examples

data.numericmatrix(data.frame(a = c("1", "2", "3"), 
                              b = c("4", "5", "6")))


ipb-halle/MetFamily documentation built on March 15, 2024, 8:39 a.m.