zap_attr {summarytools}R Documentation

Remove Attributes to Get a Simplified Object

Description

Get rid of summarytools-specific attributes to get a simple data structure (matrix, array, ...), which can be easily manipulated.

Usage

zap_attr(x, except = c("dim", "dimnames"))

Arguments

x

An object with attributes

except

Character. A vector of attribute names to preserve. By default, “dim” and “dimnames” are preserved.

Details

If the object contains grouped results:

Examples

data(tobacco)
zap_attr(descr(tobacco))
zap_attr(freq(tobacco$gender))

[Package summarytools version 1.1.4 Index]