Exclude participants with too few trials
filter_incomplete.RdRemoves participants who completed fewer than min_trials experiment
trials, as well as any rows with a missing worker_id. This guards
against partially-completed sessions being included in downstream analyses.
Value
The input data frame with rows belonging to excluded participants
(and rows with NA worker IDs) removed.
Examples
if (FALSE) { # \dontrun{
d <- data.frame(
worker_id = c(rep("p1", 600), rep("p2", 100)),
rt = rnorm(700, 1500, 300)
)
filter_incomplete(d, min_trials = 510)
# only p1 is retained
} # }