Learn R Programming

purrr (version 0.2.3)

is_numeric: Test is an object is integer or double

Description

Numeric is used in three different ways in base R:

  • as an alias for double (as in as.numeric())

  • to mean either integer or double (as in mode())

  • for something representable as numeric (as in as.numeric()) This function tests for the second, which is often not what you want so these functions are deprecated.

Usage

is_numeric(x)

is_scalar_numeric(x)

Arguments