This page describes functionality for computing item summary, i.e. some summary measurements (of arbitrary nature) of item (one or more columns) present in competition results.
1 2 3 4 5
Competition results in format ready for
Character vector of columns to group by.
Function to compute item summary (see Details).
Additional arguments to be passed to or from methods.
item defines on which columns grouping is made for
computing item summary. Basically
summary_fun to groups of
cr_data defined by
summary_fun is a function that takes competition results of a
particular item (game, player, their combination, etc.) and produces named
vector of item summary. Also it should take
argument for easier use. See item-summary-functions for more
One can control the names of the summaries by adding prefix stored in
prefix as extra argument.
tibble with columns named as stored in
item and which has all unique values of particular item
cr_data. If not
NULL then there will be extra columns for
every summary value that
get_player_summary are wrappers around
item equals to "game" and "player"
item-summary-functions for implemented
item-summary-add for adding item summary to competition results.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
cr_data <- data.frame( game = rep(1:20, each = 2), player = rep(1:10, times = 4), score = 31:70, season = rep(1:2, each = 20) ) # Computing summaries. get_game_summary(cr_data = cr_data, summary_fun = summary_min_max_score) get_player_summary(cr_data = cr_data, summary_fun = summary_min_max_score) get_item_summary( cr_data = cr_data, item = c("season", "player"), summary_fun = summary_min_max_score ) # Varying prefix of the summary columns. get_item_summary( cr_data = cr_data, item = c("season", "player"), summary_fun = summary_mean_sd_score, prefix = "seasonPlayer_" )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.