Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

maybe_matrix

Fuzzy conversions


Description

These are substitutes for as.matrix() and as.data.frame() that leave a sparse matrix as-is.

Usage

maybe_matrix(x)

maybe_data_frame(x)

Arguments

x

A data frame, matrix, or sparse matrix.

Value

A data frame, matrix, or sparse matrix.


parsnip

A Common API to Modeling and Analysis Functions

v0.1.5
GPL-2
Authors
Max Kuhn [aut, cre], Davis Vaughan [aut], RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.