maybe_matrix: Fuzzy conversions

View source: R/convert_data.R

maybe_matrixR Documentation

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 documentation built on June 24, 2024, 5:14 p.m.