rmAttr: Remove Attributes

Description Usage Arguments Value Author(s) See Also Examples

View source: R/utils.R

Description

Remove all the attributes of an object.

Usage

1
rmAttr(x, except = "class")

Arguments

x

an object whose attributes should be removed.

except

character vector. Attributes that should not be removed. NULL to remove all attributes.

Value

x with its attibutes removed.

Author(s)

Antoine Filipovic Pierucci

See Also

attributes.

Examples

1
2
3
4
5
x <- table(sample(letters, 1e3, TRUE))
(x1 <- rmAttr(x))
class(x1 <- rmAttr(x)) # still a table, without names
(x2 <- rmAttr(x, NULL))
class(x2) # integer vector

rmngb documentation built on May 29, 2017, 9:22 p.m.

Related to rmAttr in rmngb...