the newest dplyr might help with preserving attributes: http://blog.rstudio.org/2015/09/04/dplyr-0-4-3/