df2mat: Convert a dataframe to matrix

View source: R/convert.r

df2matR Documentation

Convert a dataframe to matrix

Description

Convert a dataframe including numeric values to a matrix; non-numeric columns will be deleted.

Usage

df2mat(df)

Arguments

df

A dataframe including at least one column of numeric values

Value

A matrix made of the numeric columns from the dataframe. The column names associated will be conserved. The row names will be those of the column titled "ISO3", "ISO2", "country", 'countries', 'pays', 'region', 'regions', 'names', 'name', 'id' if it exists.

See Also

Other convert: fac2num(), long(), mat2df()

Examples

Y <- df2mat(dfPolicyRate)


benjaminpeeters/BePe documentation built on July 7, 2022, 5:45 p.m.