View source: R/DataProcessing.R
data.numericmatrix | R Documentation |
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.
data.numericmatrix(x)
x |
The data.frame to convert |
A matrix with all columns converted to numeric
data.numericmatrix(data.frame(a = c("1", "2", "3"),
b = c("4", "5", "6")))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.