These are common operations that should really preserve attributes. However, because of the way they are implemented in dplyr (with an underlying call to C code), all attributes are lost following these operations.
I think a similar pattern to the one you currently have -- extract the attributes, call NextMethod, and re-assign the attributes -- should work fine, so it should be straightforward to implement.
These are common operations that should really preserve attributes. However, because of the way they are implemented in
dplyr(with an underlying call to C code), all attributes are lost following these operations.I think a similar pattern to the one you currently have -- extract the attributes, call
NextMethod, and re-assign the attributes -- should work fine, so it should be straightforward to implement.