rename_honos.Rd
Helper function to rename HoNOS variables
rename_honos( data, value_vars_current, prob_var_item8, spec_var_item8, value_vars_history, honos_version = c("working_adults"), .return_new_var_names = FALSE )
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. |
rename_honos(data = honos::honos_data, 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") )#> # A tibble: 18 x 24 #> id date team stage honos_i1_value honos_i2_value honos_i3_value #> <chr> <date> <chr> <chr> <dbl> <dbl> <dbl> #> 1 id1 2020-01-01 team1 pre 3 3 3 #> 2 id1 2020-02-11 team1 pre 3 4 3 #> 3 id1 2020-03-04 team2 pre 2 0 2 #> 4 id1 2020-04-20 team2 pre 1 2 4 #> 5 id2 2020-01-14 team1 pre 0 0 2 #> 6 id2 2020-02-22 team2 pre 1 1 1 #> 7 id3 2019-05-19 team1 pre 2 2 0 #> 8 id4 2020-11-08 team1 pre 3 0 1 #> 9 id4 2021-01-04 team2 pre 4 1 0 #> 10 id4 2021-01-15 team2 pre 0 2 2 #> 11 id4 2021-02-14 team1 pre 3 5 1 #> 12 id4 2020-02-17 team1 pre 2 4 3 #> 13 id4 2020-02-18 team2 pre 1 3 2 #> 14 id5 2020-01-01 team1 pre 0 3 4 #> 15 id5 2020-02-13 team2 pre 1 1 0 #> 16 id5 2020-03-21 team3 pre 2 2 2 #> 17 id5 2020-04-08 team2 pre 3 2 2 #> 18 id5 2020-05-02 team1 pre 0 0 0 #> # … with 17 more variables: honos_i4_value <dbl>, honos_i5_value <dbl>, #> # honos_i6_value <dbl>, honos_i7_value <dbl>, honos_i8_value <dbl>, #> # honos_i8_prob <chr>, honos_i8_spec <chr>, honos_i9_value <dbl>, #> # honos_i10_value <dbl>, honos_i11_value <dbl>, honos_i12_value <dbl>, #> # honos_i13_value <dbl>, honos_i14_value <dbl>, honos_i15_value <dbl>, #> # honos_i16_value <dbl>, honos_i17_value <dbl>, honos_i18_value <dbl>