Copy attributes from one object to another

copy_attr(to, from, attr)

Arguments

to

Object to copy attributes to

from

Object to copy attributes from

attr

Vector of attributes. If missing all attributes will be copied