count_event_position | R Documentation |
fhx
objectCount different events in an fhx
object
count_event_position( x, injury_event = FALSE, position, drop_unknown = FALSE, groupby )
x |
An |
injury_event |
Optional boolean indicating whether injuries should be
considered an "event". Default is |
position |
Depreciated. This allowed users to specify which intra-ring positions to include in the summary output table. The default counts all types of event positions. |
drop_unknown |
Boolean. Defaults to FALSE. If TRUE will remove the "unknown_fs" and/or "unknown_fi" from rec_type. |
groupby |
Optional named list containing character vectors that are used to count the total number of different event types. The names given to each character vector give the group's name in the output data frame. |
A data frame with a columns giving the event or event group and values giving the corresponding count for each event type or group.
get_event_years()
gets years for various events in an fhx
object. * yearly_recording()
count the number of "recording" events in
each year of an fhx
object. * series_stats()
basic summary stats for an
fhx
object.
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':"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.