Skip to contents

transform_ds_to_long() is a Transform function that edits an object in such a way that core object attributes - e.g. shape, dimensions, elements, type - are altered. Specifically, this function implements an algorithm to transform dataset to long. The function returns Dataset (a tibble).

Usage

transform_ds_to_long(
  ds_tb,
  predictors_chr,
  drop_underscore_1L_lgl = T,
  msrmnt_date_var_nm_1L_chr = "date_dtm",
  round_var_nm_1L_chr = "Timepoint_chr",
  row_id_nm_1L_chr = "case_id",
  time_is_sfx_1L_lgl = T
)

Arguments

ds_tb

Dataset (a tibble)

predictors_chr

Predictors (a character vector)

drop_underscore_1L_lgl

Drop underscore (a logical vector of length one), Default: T

msrmnt_date_var_nm_1L_chr

Measurement date variable name (a character vector of length one), Default: 'date_dtm'

round_var_nm_1L_chr

Round variable name (a character vector of length one), Default: 'Timepoint_chr'

row_id_nm_1L_chr

Row identity name (a character vector of length one), Default: 'case_id'

time_is_sfx_1L_lgl

Time is suffix (a logical vector of length one), Default: T

Value

Dataset (a tibble)