R: Numbers

is.number {rapportools} | R Documentation

## Numbers

### Description

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

### Usage

    is.number(x, integer = FALSE)

### 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

    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

[Package rapportools version 1.0 Index]