An object to operate on attributes from the object
list.levels
A non-negative integer specifying the number of levels of lists to apply the removal to
protected
A character vector containing the names of protected attributes (not to be removed)
Value
The object is returned with non-protected attributes removed
Details
This function removes non-protected attributes from an R object. If the object is a list then
the function will remove attributes within elements of the list down to the level specified by the
list.levels input. (By default the function removes attributes from all levels of lists.) If
you do not want to remove attributes from elements of a list (but still remove attributes from the outer
level) you can set list.levels = 0 to do this..