Compute the sex of the individuals
Usage
addSex(
x,
cdm = lifecycle::deprecated(),
sexName = "sex",
missingSexValue = "None"
)
Arguments
- x
Table with individuals in the cdm.
- cdm
A cdm_reference object.
- sexName
name of the new column to be added.
- missingSexValue
Value to include if missing sex.
Examples
# \donttest{
cdm <- mockPatientProfiles()
cdm$cohort1 %>%
addSex()
#> # Source: table<og_154_1714466081> [2 x 5]
#> # Database: DuckDB v0.10.1 [unknown@Linux 6.5.0-1018-azure:R 4.4.0/:memory:]
#> cohort_definition_id subject_id cohort_start_date cohort_end_date sex
#> <dbl> <dbl> <date> <date> <chr>
#> 1 1 1 2020-01-01 2020-04-01 Female
#> 2 1 1 2020-06-01 2020-08-01 Female
CDMConnector::cdmDisconnect(cdm = cdm)
# }