permute_sign {permutest} | R Documentation |
Sign permutation
Description
This function takes a data frame and group and outcome column name as input and returns the dataframe with the group column replaced with randomly assigned signs
Usage
permute_sign(df, group_col, strata_col = NULL, seed = NULL)
Arguments
df |
A data frame |
group_col |
The name of the column in df that corresponds to the group label |
strata_col |
The name of the column in df that corresponds to the strata, should be NULL for this function |
seed |
An integer seed value |
Value
The inputted data frame with the group column replaced with randomly assigned signs
Examples
data <- data.frame(group_label = rep(1, 6), outcome = 1:6)
permute_group(df = data, group_col = "group_label", strata_col = NULL, seed = 42)
[Package permutest version 1.0.0 Index]