fantasysocceR

Description

The team_pal function provides a simple palette for the teams in the 2014/15 Premiership season.

Usage

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

Arguments

param details
teams which teams colours are required
simple return a single colour per team
n return more than a single colour (max of 3)

Example use

For most plots all that is needed is a single colour, these can be returned by simply calling the function and leaving the defaults as they are, which returns a named vector:

team_pal()
##        Arsenal    Aston Villa    Bournemouth        Burnley        Chelsea 
##      "#EF0107"      "#7A003C"      "#EB172B"      "#53162F"      "#034694" 
## Crystal Palace        Everton           Hull      Leicester      Liverpool 
##      "#1B458F"      "#274488"      "#F5A12D"      "#0053A0"      "#D00027" 
##       Man City        Man Utd      Newcastle        Norwich            QPR 
##      "#5DBFEB"      "#DA020E"      "#231F20"      "#F1F100"      "#005CAB" 
##    Southampton          Spurs          Stoke     Sunderland        Swansea 
##      "#ED1A3B"      "#001C58"      "#E03A3E"      "#EB172B"      "#000000" 
##        Watford      West Brom       West Ham 
##      "#EAEA0C"      "#091453"      "#60223B"

If only a few teams are required, then enter the team names as a vector, and a named vector will be returned.

team_pal(teams = c("Arsenal", "Man City", "Chelsea", "Man Utd"))
##   Arsenal  Man City   Chelsea   Man Utd 
## "#EF0107" "#5DBFEB" "#034694" "#DA020E"

If more than one colour for a team is required, then enter a single team name and alter the n argument

team_pal(team = "Arsenal", n = 3)
## $Arsenal
## [1] "#EF0107" "#023474" "#9C824A"