I couldn't thing about a better title, but I run into problems since the new dplyr release.
I narrowed it down to a single dplyr call, but it changes different variables in my script, even they are not "touched" by the dplyr call.
First of all, there is a group_by_at call, because 'if there is a column "species", I want to group by it'.
If the column does not exist, I get a warning, which was fine for me, but I don't understand the class changes for the other variables. This bringt problems downstream in my script because older functions can't handle the tibble yet.
library(dplyr)
set.seed(1)
# df <- data.frame(species=c('a','b'),
# Intensity=rnorm(1000, 25, 3))
df <- data.frame(Intensity=rnorm(1000, 25, 3))
class(df)
df_backup <- df
df_test <-
df %>%
dplyr::group_by_at(vars(matches('^species$'))) %>%
dplyr::summarise(`5%`=stats::quantile(log10(Intensity),.05),
`50%`=stats::quantile(log10(Intensity),.50),
`95%`=stats::quantile(log10(Intensity),.95))
class(df)
class(df_test)
class(df_backup)
I couldn't thing about a better title, but I run into problems since the new dplyr release.
I narrowed it down to a single dplyr call, but it changes different variables in my script, even they are not "touched" by the dplyr call.
First of all, there is a
group_by_atcall, because 'if there is a column "species", I want to group by it'.If the column does not exist, I get a warning, which was fine for me, but I don't understand the class changes for the other variables. This bringt problems downstream in my script because older functions can't handle the
tibbleyet.