Learn R Programming

survivoR (version 2.3.5)

add_tribe_colour: Add tribe colour

Description

Add tribe colour to the data frame. Useful for preparing the data for plotting with ggplot2.

Usage

add_tribe_colour(df, .tribe_status = "Original")

Value

Data frame with tribe_colour added

Arguments

df

Data frame. Requires version_season and tribe.

.tribe_status

Tribe status e.g. original, swapped, swapped_2, etc.

Examples

Run this code

library(survivoR)
library(dplyr)

get_cast("US47") |>
  add_tribe() |>
  add_tribe_colour()

Run the code above in your browser using DataLab