#collect relevant columnsrelevant_columns <- coltype_check$details |>pull(col)#select relevant columnsdata <- data |>select(any_of(relevant_columns))#label variablesdata <-data |>add_radio_factors(codebook, var_col =`Variable / Field Name`, type_col =`Field Type`,levels_col =`Choices, Calculations, OR Slider Labels` ) |>add_col_labels(codebook, var_col =`Variable / Field Name`, label_col =`Field Label`)
Warning in add_col_labels(add_radio_factors(data, codebook, var_col = `Variable
/ Field Name`, : Labels provided for variables not in `data`: availability
#reorder variablesdata <- data |>relocate(any_of(codebook$`Variable / Field Name`))
Summarize results
table_health(data)
Lifestyle and health
N
N = 231
Are you currently taking any medications? This includes non-prescription medication such as antihistamines, painkillers, etc.
23
7 (30%)
Do you regularly (once per week or more) smoke cigarettes or other tobacco products?
23
1 (4.3%)
Are you regularly (once a week or more) using recreational drugs?
0
0 (NA%)
missing
23
Are you currently diagnosed with a sleep and/or psychiatric disorder?
23
0 (0%)
How is your health in general?
23
Excellent
10 (43%)
Very good
8 (35%)
Good
4 (17%)
Fair
1 (4.3%)
Poor
0 (0%)
Very poor
0 (0%)
This experiment will require you to wear non-prescription glasses for a week. To ensure this is possible, please select the option that best describes your visual acuity.
23
I do not require prescription glasses and/or contact lenses
19 (83%)
I require prescription glasses and/or lenses but I am willing to only wear contact lenses during the experimental week
3 (13%)
I require prescription glasses and/or lenses and I will need to wear glasses during the experimental week