dot-prep_fu function

Data checking/preparation: follow-up variable

Data checking/preparation: follow-up variable

This function prepares the follow-up (FU) variable for analysis by giving it a default name (fu) and factorising

.prep_fu(df, name = NULL, levels = NULL)

Arguments

  • df: A data frame.
  • name: Column name in the data frame that contains follow-up information.
  • levels: Levels to factorise the FU variable into.

Returns

A data frame with the follow-up variable renamed as "fu" and factorised.

Examples

df <- data.frame(id = c(1, 1, 2, 2), visit = c("baseline", "follow-up", "baseline", "follow-up")) .prep_fu(df = df, name = "visit", levels = c("baseline", "follow-up"))
  • Maintainer: Kim Rand
  • License: GPL (>= 2)
  • Last published: 2024-05-21

Useful links