allComb: Logical vectors of meta data

Description Usage Arguments Value Note Examples

View source: R/helper_functions.R

Description

Given the names of the columns of the data calculates the logical vectors of each subset of the data

Usage

1
allComb(data, columns)

Arguments

data

A data.frame with factors

columns

names of the columns to be used

Value

a matrix with the logical values of each combination of the levels of the columns given for the data in each column.

Note

If some rows are all FALSE it means some values are NA.

Examples

1
2
3
4
disease <- factor(sample(c("disease", "control"), 15, TRUE))
ileum <- factor(sample(c("ileum", "colon"), 15, TRUE))
df <- cbind.data.frame(disease, ileum)
allComb(df, c("disease", "ileum"))

llrs/integration-helper documentation built on Sept. 24, 2021, 10:57 a.m.