set_age_classes: Set age classes

View source: R/prepare_data.R

set_age_classesR Documentation

Set age classes

Description

Classify age codes found in Gamebirds in subclasses. Subclasses are defined in the age_classes argument where each class is associated to one or several age codes.

Usage

set_age_classes(df, age_classes = NULL)

Arguments

df

The dataframe in which we want to add age classes

age_classes

A list that associates a new class with the age codes found in the "Age" column of the Gamebirds dataset, Default: NULL

Details

The age codes are found in the Gamebirds "Age" column (renamed "age_code" by default in the dataframe loaded by the package).

If no value is given for the age_classes argument, the following values are used: age_classes = list("HY" = c(2, 3, 4), "AHY" = c(1, 5, 6, 7, 8)).

Value

The modified dataframe with a new column named age_short


Vin985/gblincoln documentation built on April 21, 2022, 1:49 a.m.