mlb.colors: MLB colors

Description Usage Arguments Value Author(s) Examples

Description

Function returns a vector of character strings from a selected MLB team's color palette. The team options are c("diamondbacks", "braves", "orioles", "red_sox", "cubs", "white_sox", "reds", "indians", "rockies", "tigers", "astros", "royals", "angels", "dodgers", "marlins", "brewers", "twins", "mets", "yankees", "athletics", "phillies", "pirates", "padres", "giants", "mariners", "cardinals", "rays", "rangers", "blue_jays", "nationals").

Usage

1
2
3
4
5
mlb.colors(set = c("diamondbacks", "braves", "orioles", "red_sox", "cubs",
  "white_sox", "reds", "indians", "rockies", "tigers", "astros", "royals",
  "angels", "dodgers", "marlins", "brewers", "twins", "mets", "yankees",
  "athletics", "phillies", "pirates", "padres", "giants", "mariners",
  "cardinals", "rays", "rangers", "blue_jays", "nationals"))

Arguments

set

Character string denoting an MLB team's color palette.

Value

Vector of character strings from the selected MLB team's color palette.

Author(s)

Charles Crabtree ccrabtr@umich.edu

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
# Colorado Rockies colors
(pal = mlb.colors("rockies"))
pie(rep(1, length(pal)), labels = sprintf("%d (%s)", seq_along(pal), pal), col = pal)

# Seattle Mariners colors
(pal = mlb.colors("mariners"))
pie(rep(1, length(pal)), labels = sprintf("%d (%s)", seq_along(pal), pal), col = pal)

## End(Not run)

cdcrabtree/colorr documentation built on May 13, 2019, 2:20 p.m.