Survivor 47 has wrapped up and the data has been add to the package. There are a bunch of new things from new datasets to convenience functions to help with analysis. They are functions I use all the time, and I thought I’d add them to the core package.
Head to Github for more details and how to install.
New data
castaway_scores
contains details on castaway performance. There are three score types: challenge scores (for all challenge categories), vote history scores, and advantage scores. Higher the score the better. It also includes other vote history and advantage stats, e.g. the number of advantages played.
There is one record per player per season.
add_*() functions
The add_*()
functions add a new column(s) to the input data frame. It means you don’t really have to think about adding on the data you need after wrangling the data.
add_alive()
: Adds a logical flag if the castaway is alive at the start or end of an episodeadd_bipoc()
: Adds a BIPOC to the data frame. If any African American (or Canadian), Asian American, Latin American, or Native American isTRUE
then BIPOC isTRUE
.add_castaway()
: Adds castaway to a data frame. Input data frame must havecastaway_id
.add_demogs()
: Add demographics that includes age, gender, race/ethnicity, and LGBTQIA+ status to a data frame with castaway_id.add_finalist()
: Adds a winner flag to the data set.add_full_name()
: Adds full name to the data frame. Useful for plotting and making tables.add_gender()
: Adds gender to a data frameadd_jury()
: Adds a jury member flag to the data set.add_lgbt()
: Adds the LGBTQIA+ flag to the data frame.add_result()
: Adds the result and place to the data frame.add_tribe()
: Adds tribe to a data frame for a specified stage of the game e.g.original
,swapped
,swapped_2
, etc.add_tribe_colour()
: Add tribe colour to the data frame. Useful for preparing the data for plotting with ggplot2.add_winner()
: Adds a winner flag to the data set.
filter_*() functions
Similarly, the filter_*()
functions are convenience functions to filter the input data. Typically the combine an add_*()
function with a follow-up filter step.
filter_alive()
: Filters a given dataset to those that are still alive in the game at the start or end of a user-specified episode.filter_final_n()
: Filters to the finaln
players e.g. the final 5.filter_finalist()
: Filters a data set to the finalists of a given season.filter_jury()
: Filters a data set to the jury members of a given season.filter_new_era()
: Filters a data set to all New Era seasons.filter_us()
: Filter a data set to a specified set of US season or list of seasons. A shorthand version offilter_vs()
for the US seasons.filter_vs()
: Filters a data set to a specified version season or list of version seasons.filter_winner()
: Filters a data set to the winners of a given season.
See the help docs in the package for examples on how to use.
The post Another season, another release. {survivoR} v2.3.5 now on CRAN appeared first on Dan Oehm | Gradient Descending.
Related