data.frame.to_matrix: Convert a dataframe to matrix

View source: R/data.frame.to_matrix.R

Convert a dataframe to matrixR Documentation

Convert a dataframe to matrix

Description

Convert a dataframe to matrix.

Usage

data.frame.to_matrix(x,col.names = NULL,row.names = NULL)

Arguments

x

A Numeric matrix with data and NAs.

col.names

A boolean value for keeping the colnames for argument x or a character vector for the new colnames.

row.names

A boolean value for keeping the rownames for argument x or a character vector for the new rownames.

Details

This functions converts a dataframe to matrix. Even if there are factors, the function converts them into numerical values. Attributes are not allowed for now.

Value

A matrix wich has the numrical values from the dataframe.

Author(s)

Manos Papadakis

R implementation and documentation: Manos Papadakis <papadakm95@gmail.com>

See Also

Match, is.symmetric, permutation

Examples

res<-data.frame.to_matrix(iris)

Rfast documentation built on Nov. 9, 2023, 5:06 p.m.