R: Does an object look like a number?

is_a_number {huxtable} | R Documentation

## Does an object look like a number?

### Description

A convenience function that returns `TRUE` if an object either is numeric or can be converted to a number. For data frames, it returns a matrix of the same dimensions as the data frame.

### Usage

    is_a_number(x)

### Arguments

`x` | An object.

### Value

A logical object with the same dimensions as `x`.

### Examples

    is_a_number(1.0)
    is_a_number("1.0")
    is_a_number("a")
    ht <- hux(a = 1:3, b = 1:3, add_colnames = TRUE)
    is_a_number(ht)

[Package huxtable version 3.0.0 Index]