team_pal: Premiership Team colors palette

Description Usage Arguments Details Examples

Description

Palette of primary team colors where possible - the secondary color is used when the primary color is white.

Usage

1
team_pal(teams = NULL, simple = TRUE, n = 1)

Arguments

teams

specify teams (not always necessary)

simple

return a single colour per team

n

number of colours to return in a palette (per team) (maximum of 3)

Details

It returns a named vector, with the team names matching the format of the datasets in this package. It can simply be called within a ggplot plot, see examples

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
team_pal(teams = c("Arsenal", "Aston Villa"))

# using within ggplot
data(players)
ggplot(players, aes(x=value, y=pts, color=team)) +
     geom_point() +
     scale_color_manual(values = team_pal()) 

## End(Not run)

durtal/fantasysocceR documentation built on May 15, 2019, 6:01 p.m.