variable_pair_combinations: Create all combinations of variable names

View source: R/utils.R

variable_pair_combinationsR Documentation

Create all combinations of variable names

Description

Useful in a an apply loop when associations should be tested between many variables in a data frame.

Usage

variable_pair_combinations(data, sel = tidyselect::everything())

Arguments

data

a data frame as input

sel

parsed to dplyr::select(). To include/exclude variables.

Value

a character value matrix with two columns, containing all possible pairs of variable names

Examples

variable_pair_combinations(immune_data, sel = -c(Sex, Frailty.index, Batch))

LDSamson/associationstudies documentation built on April 14, 2025, 11:52 a.m.