createSequentialIdentifier: Create an id based for each sample based on a unique...

View source: R/dbplyHelper.R

createSequentialIdentifierR Documentation

Create an id based for each sample based on a unique combination of variables

Description

Sometime simpler to rename multiple grouping columns as one single column which encodes all the possible combinations.

Usage

createSequentialIdentifier(df, groupVars, sampleIdVar)

Arguments

df

- a df which may be grouped in which case the grouping can be interpreted as a feature and each group must have the same number in it.

groupVars

- the columns(s) for which we want to create a label - as a list of columns quoted by vars(...). Essentially a combination of discrete variables. i.e. identifies each sample.

sampleIdVar

- the name of the target column for the new discrete variable (or sample identifier)

Value

a dbplyr dataframe containing the grouped function


terminological/tidy-info-stats documentation built on Nov. 19, 2022, 11:23 p.m.