I realized that a simple code:
x <- data_group(dakMerge[1:50, ], "ID")
data_filter(x, sum(!is.na(psmu_wg_rs)) >= 3)
takes ~0.23 seconds on average when a) tidyverse is not loaded or b) we explicitly convert the input in data_filter.grouped_df() to a data frame.
Else - I don't know why - the same codes takes ~6 seconds on average.
I profiled the code, and indeed, it seems to be related to some tidyverse-stuff going on:
