Learn R Programming

useful (version 1.2.6)

find.case: find.case

Description

Checks if strings are all upper or all lower case

Usage

find.case(string, case = c("upper", "lower", "mixed", "numeric"))

Value

A vector of TRUE AND FALSE

Arguments

string

Character vector of strings to check cases

case

Whether checking for upper or lower case

Author

Jared P. Lander

Details

Checks if strings are all upper or all lower case. If string is all numbers it returns TRUE.

See Also

upper.case lower.case numeric.case mixed.case

Examples

Run this code
toCheck <- c('BIG', 'little', 'Mixed', 'BIG WITH SPACE', 'little with space', 'MIXED with SPACE')
find.case(toCheck, 'upper')
find.case(toCheck, 'lower')

Run the code above in your browser using DataLab