filter_alive {survivoR} | R Documentation |
Filter Alive
Description
Filters a given dataset to those that are still alive in the game at the start or end of a user specified episode.
Usage
filter_alive(df, .ep = NULL, .at = "end")
Arguments
df |
Input data frame. Must have |
.ep |
Episode. This will filter the castaways that are still alive at either the start or end of the episode. |
.at |
Either 'start' or 'end' to filter those who are still alive in the game. |
Value
A data frame filtered to castaways who are alive.
Examples
library(survivoR)
library(dplyr)
confessionals |>
filter_us(47) |>
filter_alive(12) |>
group_by(castaway) |>
summarise(n = sum(confessional_count))
[Package survivoR version 2.3.5 Index]