scatterPlot: Produce a ggplot2 Scatter Plot

View source: R/scatterPlot.R

scatterPlotR Documentation

Produce a ggplot2 Scatter Plot

Description

Create a ggplot2 scatter plot object of summary team statistics. Can display a trend line if desired.

Usage

scatterPlot(
  x,
  y,
  games = "all",
  gender = "women",
  trend = FALSE,
  dynamic = TRUE
)

Arguments

x

x-axis variable

y

y-axis variable

games

graphing 'all' (default), 'conference', or 'nonconference' games. Currently no support for 'nonconference' games

gender

'women' (default) or 'men'

trend

TRUE (default) for smoothing trend line, FALSE for no trend line

Value

a ggplot2 scatter plot object

Examples

scatterPlot(x="Assists", y="PenaltyMinutes")
scatterPlot(x="Goals", y="Assists", games="conference", gender="men", trend=TRUE)

CharlesReinhardt/ecacr documentation built on May 14, 2022, 2:24 a.m.