is.number: Numbers

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Checks if provided object is a number, i.e. a length-one numeric vector.

Usage

1

Arguments

x

an object to check

integer

logical: check if number is integer

Value

a logical value indicating whether provided object is a string

Examples

1
2
3
4
5
is.number(3)              # [1] TRUE
is.number(3:4)            # [1] FALSE
is.number("3")            # [1] FALSE
is.number(NaN)            # [1] TRUE
is.number(NA_integer_)    # [1] TRUE

rapportools documentation built on May 29, 2017, 11:01 a.m.