Separate Baseline Scores in a Data Frame
separate_baseline_df.Rd
This function separates baseline data in a data frame by separating baseline and non-baseline records.
Usage
separate_baseline_df(
df,
time_var = "Time",
baseline_lvl = "Baseline",
var_name = "Outcome",
id_vars = c("PartId", "Group")
)
Arguments
- df
A data frame containing the data.
- time_var
A string specifying the name of the time variable (default is "Time").
- baseline_lvl
A string specifying the baseline level (default is "Baseline").
- var_name
A string specifying the name of the outcome variable (default is "Outcome").
- id_vars
A character vector of identifier variables (default is c("PartId", "Group")).