Description Usage Arguments Examples
View source: R/cleaning_functions.R
Convert random group names (e.g. "a", "b") into meaningful groups (e.g. "control", "experimental"). It can be used to unblind at the *end* of the analysis, or it can be used as "scrambled" at the beginning of the analysis. Returns a data frame with all (unused) columns of data and key.
1 | remove_blinding(data, key, scramble = FALSE)
|
data |
Dataframe with (at least) two columns: "sample_id" and "blinded_group" |
key |
Dataframe with (at least) two columns: "blinded_group" and "key" |
scramble |
Specifies whether to scramble the groups or not. Can be either TRUE or FALSE |
1 2 3 | x <- data.frame(sample_id = c(1:20), blinded_group = c(rep(c(1:4), each = 5)))
y <- data.frame(blinded_group = 1:4, key = c("control", "drug_a", "drug_b", "drug_c"))
z <- unblind(x,y)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.