Learn R Programming

wrMisc (version 1.15.3.1)

nNonNumChar: Count number of non-numeric characters

Description

nNonNumChar counts number of non-numeric characters. Made for positive non-scientific values (eg won't count neg-sign, neither Euro comma ',')

Usage

nNonNumChar(txt)

Value

This function returns a numeric vector with numer of non-numeric characters (ie not '.' or 0-9))

Arguments

txt

character vector to be treated

See Also

Examples

Run this code
nNonNumChar("a1b "); sapply(c("aa","12ab","a1b2","12","0.5"), nNonNumChar)

Run the code above in your browser using DataLab