Skip to contents

add_participation_var() is an Add function that updates an object by adding new values to new or empty fields. Specifically, this function implements an algorithm to add participation variable. The function returns Data (a tibble).

Usage

add_participation_var(
  data_tb,
  id_var_nm_1L_chr = "fkClientID",
  fup_round_nbr_1L_int = 2L,
  participation_var_1L_chr = "participation",
  timepoint_vals_chr = c("Baseline", "Follow-up")
)

Arguments

data_tb

Data (a tibble)

id_var_nm_1L_chr

Identity variable name (a character vector of length one), Default: 'fkClientID'

fup_round_nbr_1L_int

Follow-up round number (an integer vector of length one), Default: 2

participation_var_1L_chr

Participation variable (a character vector of length one), Default: 'participation'

timepoint_vals_chr

Timepoint values (a character vector), Default: c("Baseline", "Follow-up")

Value

Data (a tibble)