clean_dataset | R Documentation |
This function takes a dataframe directly exported from Gamebirds and prepares it to be used by the gblincoln package. It performs the following actions in the following order:
Rename columns (see rename_columns
)
Add age classes (see set_age_classes
)
Add sex classes (see set_sex_classes
)
Correct recovery years (see correct_recovery_years
)
clean_dataset( df, rename_columns = TRUE, colnames = NULL, add_age_classes = TRUE, age_classes = NULL, add_sex_classes = TRUE, sex_classes = NULL, correct_recovery_years = TRUE )
df |
The dataframe to clean. Must contain untouched data coming from Gamebirds. |
rename_columns |
Should the columns be renamed? Default: TRUE |
colnames |
Data frame. The columns to rename. Will be passed as the |
add_age_classes |
Should the function add age classes? Default: TRUE |
age_classes |
The age classes that will be passed as the |
add_sex_classes |
Should the function add sex classes? Default: TRUE |
sex_classes |
The sex classes that will be passed as the |
correct_recovery_years |
Should the recovery years be corrected? Default: TRUE |
Adding age classes will only work if the age_code column is present in the dataframe.
Adding sex classes will only work if the sex_code column is present in the dataframe.
Correcting recovery years will only work if the r.year column is present in the dataframe
The modified dataframe
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.