# NOT RUN {
data(pgm)
count_event_position(pgm)
# As above, but considering injuries to be a type of event.
count_event_position(pgm, injury_event = TRUE)
# Often we only quantify known intra-ring positions.
# Remove the "unknown_fs" and/or "unknown_fi" with
count_event_position(pgm, drop_unknown = TRUE)
# Using custom "groupby" args in a named list, as
grplist <- list(
foo = c("dormant_fs", "early_fs"),
bar = c("middle_fs", "late_fs")
)
count_event_position(pgm, groupby = grplist)
# Note that if a position in the groupby list is
# not included in rec_type, forcats::fct_count()
# will throw a flag for an "Unknown levels in 'f':"
# }
Run the code above in your browser using DataLab