Description Usage Arguments Value Examples
This is a helper function that computes change in score between pre and post test. The data must be pre-processed by the followng functions: sum_weights() and id_prepost()
1 | compute_change(df, col = c("subject_id", "prepost", "score"))
|
df |
dataframe: a dataframe returned by id_prepost() |
col |
character vector: name of columns to keep to compute change in scores. There should be 3 columns: A column containing participant ids, a column specifying whether this is a pre / post record, a column containing the total score. |
dataframe
1 2 3 4 5 6 7 | tp <- laycUtils::load_txt('./my_data_folder/touchpoints.txt')
tp <- laycUtils::format_data(tp)
tp <- tp[tp$tp_name == "jrt pre-/post test", ]
tp <- sum_weights(tp)
tp <- id_prepost(tp)
compute_change(df = tp)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.