dftomat: Convert Data Frame to Numeric Matrix

View source: R/dftomat.R

dftomatR Documentation

Convert Data Frame to Numeric Matrix

Description

This function converts a data frame into a numeric matrix. If the data frame contains factor variables, they are first converted to dummy variables (one-hot encoding). If the data frame contains character variables, they are first converted to factors and then to dummy variables.

Usage

dftomat(df)

Arguments

df

A data frame to be converted to a numeric matrix.

Value

A numeric matrix corresponding to the input data frame.


DistributionIV documentation built on Sept. 9, 2025, 5:52 p.m.