Description Usage Arguments Examples
THis functions transforms HoNOS data from wide (i.e., one row per assessment, one column per variable) to long (i.e., one row per item) data. This data format is needed to perform common calculations and visualisations of HoNOS data in R. This function automatically replaces the value 9 with a missing value ('NA').
1 2 3 4 5 6 7 8 9 10 | pivot_honos_longer(
data,
id_var,
value_vars_current,
prob_var_item8,
spec_var_item8,
value_vars_history,
honos_version = c("working_adults"),
pivot = c("all_items", "item_scores")
)
|
data |
Dataset including HoNOS variables in wide format (i.e., one row per assessment, one column per item) |
value_vars_current |
Vector, specifying variable names with values for 'current' items |
prob_var_item8 |
Vector, specifying variable name with description of problem (prob) for item 8 |
spec_var_item8 |
Vector, specifying variable name with problem specification (spec) of for item 8 |
value_vars_history |
Vector, specifying specifying variable names with values for 'historic' items |
honos_version |
Vector, specifying version of the HoNOS that is being used. TODO IMPLEMENT MORE VERSIONS. |
pivot |
String, specifying whether to include item 8 problem and item 8 specification in the long format ('all_items') or whether to only include all item scores in long format ("item_scores"). |
1 2 3 4 5 6 7 8 | pivot_honos_longer(data = honos_data,
id_var = id,
value_vars_current = c("q1", "q2", "q3", "q4", "q5", "q6", "q7",
"q8", "q9", "q10", "q11", "q12", "q13"),
prob_var_item8 = c("q8_prob"),
spec_var_item8 = c("q8_spec"),
value_vars_history = c("qa", "qb", "qc", "qd", "qe"),
pivot = "all_items")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.