team_win_record: Returns as a vector or string the win record of a given team.

View source: R/team_win_record.R

team_win_recordR Documentation

Returns as a vector or string the win record of a given team.

Description

Asked in the homework as part of Question 3e. Counts the total number of games played by the team, calculates how many games the team won, and calculates a win percentage. Returns a sentance (character string) or a numeric vector based on the value of 'text'.

Usage

team_win_record(data, team, text = FALSE)

Arguments

data

A tibble, preferable the kenpom data

team

A string, the team to filter for

text

Boolean Output as text rather than a vector

Value

numeric vector or character string

Examples

team_win_record(get_cbb_data(), "Southern Utah")
team_win_record(get_cbb_data(), "Southern Utah", 1)


devinwarner10/devinwcbb documentation built on April 22, 2022, 2:06 a.m.