is_digit: String methods

Description Usage Arguments Value Examples

View source: R/strings.R

Description

General test if characters in a string are digits.

Usage

1
is_digit(string)

Arguments

string

An object that inherits from class "character".

Value

Returns TRUE if all characters in the string are digits and there is at least one character, FALSE otherwise.

Examples

1
2
3
4
is_digit("abc")
is_digit("abc1")
is_digit("1")
is_digit("1.3")

bgreenwell/bmisc documentation built on Sept. 24, 2019, 11:09 a.m.