simplify: Simplify Object

View source: R/simplify.R

simplifyR Documentation

Simplify Object

Description

Coerce object to the simplest possible storage mode.

Usage

simplify(x)

Arguments

x

a list, data frame, matrix, or vector.

Value

Object of same dimensions as x, using simplest possible storage modes.

Note

⁠factor -> character -> numeric -> integer⁠

If user knows that x is a factor coercible to numeric/integer, then as.numeric(levels(x))[x] is faster.

Numbers outside the two billion range are not coerced to integers: c(-2147483647, 2147483647).

Faster than type.convert(as.character(x)).


arnima-github/arni documentation built on Oct. 28, 2023, 6:18 p.m.