orderByString: find the order of a string vector so it will match the order...

View source: R/utils.r

orderByStringR Documentation

find the order of a string vector so it will match the order of another

Description

find the order of a string vector so it will match the order of another

Usage

orderByString(x, y)

Arguments

x

a vector of strings

y

a vector of strings

Value

a vector of strings

Examples

## Not run: 
a <- c("c", "a", "b")
b <- c("b", "c", "a")
index <- orderByString(a, b) # to order b like a needs what indexes?
index
b[index]

## End(Not run)


markheckmann/OpenRepGrid documentation built on April 14, 2024, 8:15 a.m.