atleast_2d {ramify}R Documentation

View Input as an Array with at Least Two Dimensions.

Description

Ensure that the input has at least two dimensions.

Usage

atleast_2d(x)

Arguments

x

An R object, for example a vector, matrix, array, or data frame.

Value

The same object, but with a "dim" attribute.

Examples

x <- 1:10
x
atleast_2d(x)

[Package ramify version 0.3.3 Index]