nNonNumChar: Count number of non-numeric characters

View source: R/nNonNumChar.R

nNonNumCharR Documentation

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)

Arguments

txt

character vector to be treated

Value

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

See Also

nchar

Examples

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

wrMisc documentation built on Sept. 11, 2024, 6:10 p.m.