strs_isdecimal: Check if string contains only decimal characters

View source: R/isdecimal.R

strs_isdecimalR Documentation

Check if string contains only decimal characters

Description

strs_isdecimal checks whether each element of a character vector contains only decimal characters. It is similar to Python's str.isdecimal() method.

Usage

strs_isdecimal(string)

Arguments

string

A character vector to be checked.

Value

A logical vector of the same length as string, indicating whether each element contains only decimal characters.

See Also

Python str.isdecimal() documentation

Examples

strs_isdecimal("12345")
strs_isdecimal("123.45") # FALSE

strs documentation built on Sept. 11, 2024, 6:44 p.m.