getrWAR: getrWAR

Description Usage Details Value Examples

View source: R/getrWAR.R

Description

Retrieves rWAR from Baseball-Reference.com

Usage

1

Details

Retrieves daily rWAR figures from Baseball-Reference.com and stores it as a data.frame

Value

a data.frame consisting of rWAR

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Get data from yesterday
ds = getrWAR()
mosaic::densityplot(~WAR, data=ds, plot.points=FALSE)

# Leaders since 1954
modern = subset(ds, yearId >= 1954)
head(modern[order(modern$WAR, decreasing=TRUE),], 20)

# Relationship between batting and fielding
xyplot(RAA_field ~ RAA_bat, data=modern, type=c('p', 'r', 'smooth'))

frogman141/openWAR documentation built on Dec. 20, 2021, 8:52 a.m.