ez.copyattr | R Documentation |
copy attr of a df or vector, save as a list of list, or list respectively
ez.copyattr(x, col = NULL, attrs = c("label", "labels"), ...)
x |
a data frame or a vector |
col |
evaluated by |
attrs |
variable label: c('variable.labels', 'label'); value labels: c('value.labels', 'labels'). run names(attributes(x)) to see all attributes. But be cautionous that some attributes are "dangerous" to directly copy and paste this way (eg., levels,class) |
returns a list of list (x is df), or list (x is vector). Works fine even if x, its col, does not have attrs.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.