Learn R Programming

wrMisc (version 1.15.3.1)

.convertNa: Convert/standardize names of 'query' to standard names from 'ref'

Description

This function converts/standardizes names of 'query' to standard names from 'ref' (list of possible names (char vect) where names define standardized name). It takes 'query' as character vector and return character vecor (same length as 'query') with 'converted/corrected' names

Usage

.convertNa(query, ref, partMatch = TRUE)

Value

This function returns a character vector

Arguments

query

(matrix or data.frame, min 2 columns) main input

ref

(list) list of multiple possible names associated to given group, reference name for each group is name of list

partMatch

(logical) allows partial matching (ie name of 'ref' must be in head of 'query')

Examples

Run this code
daPa <- matrix(c(1:5,8,2:6,9), ncol=2)

Run the code above in your browser using DataLab