anxiety {AnxietySleep}R Documentation

Data from the anxiety and confinement study.

Description

[Stable]

This dataset contains the variables used in the anxiety and confinement study carried out by Alvarado-Aravena et al. 2022.

Usage

anxiety

Format

A data frame with 617 rows y 7 variables:

Source

Examples

# Mean age grouped by sex and zone using `data.table` syntax
anxiety[,  # No filtering (i)
        list(mean_age = mean(age)), # Action to do (j)
        list(sex, zone)] # Grouping vars (by)

# Mean PSQI score grouped by sex and zone, for those with
# an age greater than 18 AND a Beck score greater than 10.
anxiety[age > 18 & beck_global > 10,
        list(mean_psqi = mean(pits_global)),
        list(sex, zone)]


[Package AnxietySleep version 0.0.1 Index]