Description Usage Arguments Value Examples
Convenience function to turn long-format test-retest data to wide format.
1 | trt_widify(data, values, cases, rater = NULL)
|
data |
The total data frame |
values |
Column of the measured values (quoted character) |
cases |
Column of the individual values, i.e. individuals/measured items (character) |
rater |
Optional. Column of the rater/which measurement, i.e. measurement 1 and measurement, or raters 1, 2 and 3. If this is not specified, the function will assume that the values are in order by rater, or that it the order doesn't matter. |
A tibble containing the test-retest data in wide format.
1 2 3 4 5 6 7 | library(tidyverse)
data("petVT", package = 'agRee')
amy <- as.data.frame(petVT$amygdala)
amy_l <- gather(amy) %>%
mutate(indiv = rep(paste0('s', 1:11), times=2))
trt_widify(amy_l, 'value', 'indiv', 'key')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.