prFindRownameMatches: Looks for unique rowname match without grep

View source: R/private_functions.R

prFindRownameMatchesR Documentation

Looks for unique rowname match without grep

Description

Since a rowname may contain characters reserved by regular expressions I've found it easier to deal with the rowname finding by just checking for matching strings at the beginning of the name while at the same time excluding names that have the same stem, i.e. DM and DM_COMP will cause an issue since DM will match both rows.

Usage

prFindRownameMatches(rnames, vn, vars)

Arguments

rnames

A vector with the rownames that are looked for

vn

The variable name that is of interest

vars

A vector with all the names and the potentially competing names

Value

integer A vector containing the position of the matches

TODO: remove this function in favor of the more powerful prMapVariable2Name


gforge/Greg documentation built on Feb. 3, 2024, 5:37 a.m.