Description Usage Arguments Value Author(s) Examples
View source: R/createSexAgeCateg.R
This function will create a vector of the age and sex category of the the participants. Before using this function, make sure that the IDs associated with the sex and age vectors are indentically ordered. Note that if the sex vector is omitted, an age category vector will be produced.
1 | createSexAgeCateg(ageVec, sexVec = c(), breaks)
|
ageVec |
Vector containing the age of participants. |
sexVec |
Vector containing the sex of participants. |
breaks |
Indicates the interval size in years of each category. Currently, intervals of 5, 10 and 20 years are supported. |
This function returns a vector of age and sex, if specified, categories.
Phil Boileau, philippe.boileau (at) rimuhc.ca
1 2 3 4 | sex <- c("M", "F", "F")
age <- c(40, 33, 34)
ageSexVec <- createSexAgeCateg(ageVec = age, sexVec = sex,
breaks = 5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.