View source: R/OnlyAdolescentsAndYoungAdults.R
Keeps only the adolescents and young adults.
1 2 3 | OnlyAdolescentsAndYoungAdults(study.sample, age.variable.name = "age",
lower.age.cutoff = 10, upper.age.cutoff = 24,
remove.missing = TRUE)
|
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. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.