filesstrings (version 0.4.0)

CanBeNumeric: 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 vectorised over its one argument.

Usage

CanBeNumeric(string)

Arguments

string

A character vector.

Value

A character vector. TRUE if the argument can be considered to be numeric or FALSE otherwise.

Examples

Run this code
CanBeNumeric("3")
CanBeNumeric("5 ")
CanBeNumeric(c("1a", "abc"))

Run the code above in your browser using DataCamp Workspace