Learn R Programming

charcuterie (version 0.0.4)

is_number: Is a Character a Number?

Description

Compares against the values of 0:9 (as a number).

Usage

is_number(x)

Value

A boolean vector indicating whether each element of x is a number (appears in 0:9 as a number)

Arguments

x

A vector of characters.

Examples

Run this code
is_number(chars("Lee7c0deR"))

Filter(is_number, chars("w00t"))

Run the code above in your browser using DataLab