OnlyAdolescentsAndYoungAdults: Only adolescents and young adults

Description Usage Arguments

View source: R/OnlyAdolescentsAndYoungAdults.R

Description

Keeps only the adolescents and young adults.

Usage

1
2
3
OnlyAdolescentsAndYoungAdults(study.sample, age.variable.name = "age",
  lower.age.cutoff = 10, upper.age.cutoff = 24,
  remove.missing = TRUE)

Arguments

study.sample

Data frame. The study sample. No default.

age.variable.name

Character vector of length 1. The name of the age variable. Defaults to "age".

lower.age.cutoff

Numeric vector of length 1. The lower age cutoff. Defaults to 10, i.e. only observations with an age of at least ten and at most upper.age.cutoff are kept in the sample.

upper.age.cutoff

Numeric vector of length 1. The upper age cutoff. Defaults to 24, i.e. only observations with an age of at least lower.age.cutoff and at most 24 are kept in the sample.

remove.missing

Logical vector of length 1. If TRUE all observations with missing age, as detected by is.na, are removed from the sample. Defaults to TRUE.


martingerdin/bengaltiger documentation built on Feb. 29, 2020, 4:46 p.m.