is_number: Check if an object is a number

View source: R/pretty_axis_support.R

is_numberR Documentation

Check if an object is a number

Description

This function checks if an input is a number (i.e., an integer or numeric object).

Usage

is_number(x, first = FALSE)

Arguments

x

An object.

first

A logical variable that defines whether or not to select x[[1]]. This avoids issues with some inputs (e.g., scale(x) is a matrix).

Value

A logical value which defines whether or not x is a number.

Author(s)

Edward Lavender


edwardlavender/prettyGraphics documentation built on Jan. 19, 2025, 2:47 p.m.