Calculates the cohort from the subject ID

calculate_cohort(subjid)

Arguments

subjid

A vector with with subject IDs.

Value

A vector of the same length with cohort name

Examples

id <- c("050-GSED-12345", "156-GSED-32211", "076-GSED-123")
calculate_cohort(id)
#> [1] "GSED-BGD" "GSED-CHN" "GSED-BRA"