orderIn: Find the order of one vector in another

View source: R/misc.R

orderInR Documentation

Find the order of one vector in another

Description

Find the order of one vector in another

Usage

orderIn(query, target, strict = FALSE, orderFunc = order, ...)

Arguments

query

values to be sorted in target order

target

order for query to be sorted into

strict

if true error if query not in target, if false append unknown queries to end of target

orderFunc

function to use for ordering

...

arguments for order

Value

a vector the same length as query specifying the order of query elements in target

Examples

orderIn(c('z','c','a','t'),letters)

sherrillmix/dnar documentation built on July 18, 2022, 10:07 p.m.