createSexAgeCateg: Create a Vector of Age and Sex Categories

Description Usage Arguments Value Author(s) Examples

View source: R/createSexAgeCateg.R

Description

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.

Usage

1
createSexAgeCateg(ageVec, sexVec = c(), breaks)

Arguments

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.

Value

This function returns a vector of age and sex, if specified, categories.

Author(s)

Phil Boileau, philippe.boileau (at) rimuhc.ca

Examples

1
2
3
4
sex <- c("M", "F", "F")
age <- c(40, 33, 34)
ageSexVec <- createSexAgeCateg(ageVec = age, sexVec = sex,
                               breaks = 5)

gevamaimon/CLSAR documentation built on May 17, 2019, 1:53 p.m.