huxtable (version 0.2.0)

is_a_number: 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

Run this code

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)

Run the code above in your browser using DataCamp Workspace