Learn R Programming

Greg (version 2.0.2)

prFindRownameMatches: 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)

Value

integer A vector containing the position of the matches

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

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