Last data update: 2014.03.03

R: Find valid string among character vecter from approximate...
validColnameR Documentation

Find valid string among character vecter from approximate string

Description

Find valid string among character vecter from approximate string

Usage

validColname(pattern, x)

Arguments

pattern

character string to be matched in the given character

x

a character vecter where matches are sought

Value

returns NA in case of no matched string found or a character string in string vecter x

Examples

a="dx"
b=c("Age","Sex","Dx")
validColname(a,b)

Results