Description Usage Arguments Value Examples
View source: R/Old wrappers/wrappers.R View source: R/wrappers.R
This function is a wrapper which cleans data, then adjusts for park factors, then calculates MLEs, then adds biographical, position, and DL information.
1 2 3 4 |
minors |
character. Path to csv file of minor league data. Used in
|
majors |
character. Path to csv file of major league data. Used in
|
bio_info |
character. Path to csv file of bio data. Used in
|
position |
character. Path to csv file of position data. Used in
|
injuries |
character. Path to csv file of DL time. Used in
|
park_factors |
character. Path to csv file of park factors. Used in
|
year_factors |
character. Path to csv file of year factors. Used in
|
multipliers |
character. Path to csv file of multipliers for MLEs. Used
in |
ignore_players |
character. Path to csv file of players to ignore. Used
in |
clean_dir |
character. Path to write csv file of cleaned data. Used in
|
pf_dir |
character. Path to write csv file of stats adjusted for park
factors. Used in |
yf_dir |
character. Path to write csv file of stats adjusted for year
effects Used in |
mle_dir |
character. Path to write csv file of MLEs. Used in
|
miss_dir |
character. Path to write csv file with missing data. Used
in |
app_dir |
character. Path to write csv file with data for apps. Used
in |
type |
character. Whether these are batting or pitching data. Defaults to batting |
wd |
character. Used in |
nothing. Saves the data into the specified directories.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | # batters
get_MLEs(minors = "0-downloads/bat_minors2.csv",
majors = "0-downloads/bat_majors2.csv",
bio_info = "manual-info/bio_bat.csv",
position = "manual-info/positions.csv",
injuries = "manual-info/injuries.csv",
park_factors = "manual-info/Park_Factors.csv",
year_factors = "manual-info/Year-Factors.csv",
multipliers = "manual-info/Level_Multipliers.csv",
ignore_players = "manual-info/players_to_ignore.csv",
japan_ids = "manual-info/japan_ids.csv",
download_dir = "0-downloads/",
clean_dir = "1-cleaned/batters/",
pf_dir = "2-park-adjusted/",
yf_dir = "3-year-adjusted/",
mle_dir = "4-mles/",
miss_dir = "5-missing/",
app_dir = "6-for-apps/batters/",
wd = "N:/Apps/simScoresApp/data/",
type = "bat",
yrs = 2005:2014)
# pitchers
get_MLEs(minors = "0-downloads/pit_minors2.csv",
majors = "0-downloads/pit_majors2.csv",
bio_info = "manual-info/bio_pit.csv",
position = "manual-info/positions.csv",
injuries = "manual-info/injuries.csv",
park_factors = "manual-info/Park_Factors.csv",
year_factors = "manual-info/Year-Factors.csv",
multipliers = "manual-info/Level_Multipliers.csv",
ignore_players = "manual-info/players_to_ignore.csv",
japan_ids = "manual-info/japan_ids.csv",
download_dir = "0-downloads/",
clean_dir = "1-cleaned/pitchers/",
pf_dir = "2-park-adjusted/",
yf_dir = "3-year-adjusted/",
mle_dir = "4-mles/",
miss_dir = "5-missing/",
app_dir = "6-for-apps/pitchers/",
wd = "N:/Apps/simScoresApp/data/",
type = "pit",
yrs = 2005:2014)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.