View source: R/export-DataPreprocessing.R
add_cohort_column | R Documentation |
Adds a column for birth cohorts to a data frame, derived from specified age and period columns through the relation cohort = period - age
.
add_cohort_column(data, age, period, cohort_name = "cohort")
data |
Data frame with age and period column. |
age |
Age column in |
period |
Period column in |
cohort_name |
Name of the cohort column to be created. Defaults to |
Data frame with additional column for birth cohorts added.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.