str_can_be_numeric: Check if a string could be considered as numeric.

View source: R/can-be-num.R

str_can_be_numericR Documentation

Check if a string could be considered as numeric.

Description

After padding is removed, could the input string be considered to be numeric, i.e. could it be coerced to numeric. This function is vectorized over its one argument.

Usage

str_can_be_numeric(string)

Arguments

string

A character vector.

Value

A logical vector.

Examples

str_can_be_numeric("3")
str_can_be_numeric("5 ")
str_can_be_numeric(c("1a", "abc"))

strex documentation built on Nov. 2, 2023, 6:04 p.m.