gds_alter_values: Change coding of GDS to correct numeric values

View source: R/gds-funcs.R

gds_alter_valuesR Documentation

Change coding of GDS to correct numeric values

Description

Necessary step for computing the total score

Usage

gds_alter_values(
  data,
  values = gds_values(),
  reverse = FALSE,
  cols = matches("01$|05$|07$|09$|15$|19$|21$|27$|29$|30$")
)

Arguments

data

data.frame with GDS data in it

values

named vector of 2 providing the coding for Yes and No answers c(Yes = 1, No = 2)

reverse

reverse logic

cols

GDS data columns

See Also

Other gds_functions: gds_binary(), gds_compute_sum(), gds_values()


LCBC-UiO/Questionnaires documentation built on July 18, 2023, 6:45 p.m.