remove_blinding: Remove (or scramble) blinding of your groups

Description Usage Arguments Examples

View source: R/cleaning_functions.R

Description

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.

Usage

1
remove_blinding(data, key, scramble = FALSE)

Arguments

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

Examples

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)

valeriabonapersona/abc4d documentation built on Dec. 23, 2021, 2:09 p.m.