mlb.colors {colorr}R Documentation

MLB colors

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

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

## 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)

[Package colorr version 1.0.0 Index]