Is there a reason some
dplyr functions strip classes from data frames and others preserve them? I could see stripping for functions that are more "create a new data frame" than "change an existing data frame", but it's tough to nail down exactly where that line is, and it really doesn't seem to be between
d <- data.frame(x = 1:5) %>% structure(., class = c("my_df", class(.))) select(d, x) %>% class() #>  "my_df" "data.frame" mutate(d, x = x) %>% class() #>  "data.frame"