pitcher_boxscore: The box score of the pitcher player

Description Usage Arguments Value Examples

View source: R/pitcher_boxscore.R

Description

This function creates annual or periodical box score of the pitcher. This function has options called 'yearly' or 'monthly'. default: The player's annual box score is created. If you put a year in the yearly parameter, it calculates the box score of corresponding year. If you put a month in the monthly parameter, it calculates the corresponding monthly box score of every year. If you put a year and a month in each parameters, the box score of corresponding month you put in is created. If you are looking for a player who has the same name with other players, you need to find the player's ID and put it in the 'ID' parameter.

Usage

1
2
pitcher_boxscore(data = kbodatamining::hanhwa_pitcher_2018, name,
  id = NULL, yearly = NULL, monthly = NULL)

Arguments

data

'Hanhwa_pitcher_2018' is default data. You can put another kbo batter data if you want.

name

The name of the batter you want

id

This is not a required parameter. The ID parameter is a numeric type.

yearly

The default value is NULL. Possible value is a specific year.

monthly

The default value is NULL. Possible value is a specific month. The monthly parameter is a string type.

Value

The pitcher box score of the year or month put in is created.

Examples

1
2
3
4
5
6
7
8
## default: id=NULL, yearly=NULL, monthly=NULL
pitcher_boxscore(hanhwa_pitcher_2018,"<ec><a0><95><ec><9a><b0><eb><9e><8c>")
## id=NULL, yearly=2018, monthly=NULL
pitcher_boxscore(hanhwa_pitcher_2018,"<ec><a0><95><ec><9a><b0><eb><9e><8c>",yearly=2018)
## id=NULL, yearly=NULL, monthly="05"
pitcher_boxscore(hanhwa_pitcher_2018,"<ec><a0><95><ec><9a><b0><eb><9e><8c>",monthly="05")
## id=NULL, yearly=2018, monthly="05"
pitcher_boxscore(hanhwa_pitcher_2018,"<ec><a0><95><ec><9a><b0><eb><9e><8c>",yearly=2018,monthly="05")

choosunsick/kbodatamining documentation built on May 18, 2019, 1:30 p.m.