zap_attr | R Documentation |
Get rid of summarytools-specific attributes to get a simple data structure (matrix, array, ...), which can be easily manipulated.
zap_attr(x, except = c("dim", "dimnames"))
x |
An object with attributes |
except |
Character. A vector of attribute names to preserve. By default, “dim” and “dimnames” are preserved. |
If the object contains grouped results:
The inner objects will lose their attributes
The “stby” class will be replaced with “by”
The “dim” and “dimnames” attributes will be set to
available relevant values, but expect slight differences between objects
created with stby()
vs group_by()
.
data(tobacco)
zap_attr(descr(tobacco))
zap_attr(freq(tobacco$gender))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.