checkColumnCardinality: Search a data.frame for 1:'cardinality' relationships between...

View source: R/methods-guessMapping.R

checkColumnCardinalityR Documentation

Search a data.frame for 1:cardinality relationships between a group of columns (your identifiers) and all other columns.

Description

Search a data.frame for 1:cardinality relationships between a group of columns (your identifiers) and all other columns.

Usage

checkColumnCardinality(df, group, cardinality = 1, ...)

Arguments

df

A data.frame to search for 1:cardinality mappings with the columns in group.

group

A character vector of one or more column names to check the cardinality of other columns against.

cardinality

The cardinality of to search for (i.e., 1:cardinality) relationships with the combination of columns in group. Defaults to 1 (i.e., 1:1 mappings).

...

Fall through arguments to data.table::[. For developer use. One use case is setting verbose=TRUE to diagnose slow data.table operations.

Value

A character vector with the names of the columns with cardinality of 1:cardinality with the columns listed in group.

Examples

df <- rawdata(exampleDataMapper)
checkColumnCardinality(df, group='treatmentid')


bhklab/CoreGx documentation built on March 14, 2024, 3:04 a.m.