oneseason_batter_compare: Plot comparing stats of two batter during one season

Description Usage Arguments Value Examples

View source: R/oneseason_batter_compare.R

Description

This function creates a plot that compares two batters based on batter data of one season. This function has options called 'yearly' or 'monthly'. default: The 'yearly' parameter is 2018. The 'monthly' parameter is NULL If you put specific year in the yearly parameter, this function draws a batting comparing plot of the corresponding year . If you put specific month in the monthly parameter, this function draws a batting comparison plot for the matched 2018 year and specific month. If you put specific year and month in two parameters, this function draws a batting comparison plot for the matched specific year and month. If you are using MAC and Hangeul fonts are broken, type 'theme_set(theme_gray(base_family = "AppleGothic"))'

Usage

1
2
3
oneseason_batter_compare(data = kbodatamining::hanhwa_batter_2018,
  playername1, playername2, id1 = NULL, id2 = NULL, yearly = 2018,
  monthly = NULL)

Arguments

data

Default data is hanhwa_batter_2018. You can put other KBO batter data.

playername1

The first of the player you want to compare

playername2

The second of the player you want to compare

id1

Defalut value is NULL. The first of the player id you want to compare

id2

Defalut value is NULL. The second of the player id you want to compare

yearly

The default value is 2018 Possible values are a specific year.

monthly

The default value is NULL Possible values are a specific month.

Value

Plots comparing two batter stats

Examples

1
2
3
4
## default: yearly=2018, monthly=NULL
oneseason_batter_compare(hanhwa_batter_2018,"<ec><9d><b4><ec><9a><a9><ea><b7><9c>","<ec><a0><95><ea><b7><bc><ec><9a><b0>",yearly=2018)
## yearly=2018, monthly="05"
oneseason_batter_compare(hanhwa_batter_2018,"<ec><9d><b4><ec><9a><a9><ea><b7><9c>","<ec><a0><95><ea><b7><bc><ec><9a><b0>",yearly=2018,monthly="05")

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