Copy the attributes from one S3 object to another. Necessary when some operation defined for the base class obliterates them.

reassign_attributes(x_new, x_from, exceptions = NULL, attr_only = FALSE)

Arguments

x_new
the object to which the attributes will be copied
x_from
the object from which the attributes will be copied, or a list of attrbiutes if attr_only = TRUE
attr_only
logical; if TRUE, then x_orig is a list of attributes rather than an object with attributes.
exception
a character vector of attribute names NOT to be copied