clean_scores.RdThis function cleans a TRT scores dataset, based on the standard data structure.
clean_scores(
data,
state_filter = NULL,
clean_id = TRUE,
aggregate = TRUE,
id_col = NULL
)The TRT scores dataset.
A character vector identifying the state(s) of interest. Defaults to NULL.
TRUE or FALSE. Defaults to TRUE, when TRUE, rows where participant ID is missing are removed.
TRUE or FALSE. Defaults to TRUE, when TRUE, rows are aggregated to include only unique participants are kept.
Differing variable naming structure for participant ID. (Eg. "X", or another name not similar to "participant" or "ID".) Defaults to NULL.
A cleaned data frame, restructured to a wide format, to help with merging process.