pfx_graph: Graph pitchf/x data - 2 variables on different axes

Description Usage Arguments Examples

Description

Graph pitchf/x data – 2 variables on different axes

Usage

1
2
3
pfx_graph(pitcher, x, y, startdate = "2016-01-01", enddate = "2016-12-31",
  pitchtypes = "all", stand = "R','L", color.code = TRUE, save = FALSE,
  path = getwd())

Arguments

pitcher

Pitcher name or FanGraphs playerid.

x

The variable to go on the x-axis.

y

The variable to go on the y-axis.

startdate

Start date. Defaults to beginning of 2016. Format yyyy-mm-dd.

enddate

End date. Defaults to end of 2016. Format yyyy-mm-dd.

pitchtypes

Defaults to all. To include multiple pitch types, create an array: c("Four-seam fastball","Changeup","Breaking ball")

stand

Batter handedness. Defaults to both.

color.code

Whether or not to color code the pitches by pitch type. Defaults to TRUE.

save

Whether to save the graph. Defaults to FALSE.

path

Where to save the graph. Defaults to the current working directory.

Examples

1
## Not run: pfx_graph()

BillPetti/fgrapher documentation built on May 5, 2019, 3:46 p.m.