item-summary: Compute item summary

Description Usage Arguments Details Value See Also Examples

Description

Functions for computing item summary, i.e. some summary measurements (of arbitrary nature) of item (one or more columns) present in data frame.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
summarise_item(tbl, item, ..., .prefix = "")

summarise_game(tbl, ..., .prefix = "")

summarise_player(tbl, ..., .prefix = "")

summarize_item(tbl, item, ..., .prefix = "")

summarize_game(tbl, ..., .prefix = "")

summarize_player(tbl, ..., .prefix = "")

Arguments

tbl

Data frame.

item

Character vector of columns to group by.

...

Name-value pairs of summary functions (as in dplyr::summarise).

.prefix

A string to be added to all summary functions' names.

Details

Basically, summarise_item() performs the following steps:

summarise_game() and summarise_player() are wrappers for summarise_item() using item = "game" and item = "player" respectively.

Value

Output of summarise() as not grouped tibble.

See Also

Common item summary functions for competition results.

Join item summary

Examples

1
2
3
4
5
6
ncaa2005 %>%
  dplyr::mutate(game_type = game %% 2) %>%
  summarise_item(c("game_type", "player"), mean_score = mean(score))

ncaa2005 %>%
  summarise_game(mean_score = mean(score), min_score = min(score))

echasnovski/comperes documentation built on Oct. 16, 2018, 4:28 a.m.