combi: Vector combinations

View source: R/conv_funcs.R

combiR Documentation

Vector combinations

Description

Numeric codes for unique combination of vectors.

Usage

combi(...)

Arguments

...

[atomic]

Value

numeric

Examples

x <- c("A", "B", "A", "C", "B", "B")
y <- c("X", "X", "Z", "Z", "X", "Z")
combi(x, y)

# The code above is equivalent to but quicker than the one below.
z <- paste0(y, "-", x)
z <- match(z, z)
z

diyar documentation built on Nov. 13, 2023, 1:08 a.m.