is_numeric: Is numeric, nlist or nlists

View source: R/is.R

is_numericR Documentation

Is numeric, nlist or nlists

Description

Ask whether x is a numeric object, nlist_object() or nlists_object().

Usage

is_numeric(x)

is_nlist(x)

is_nlists(x)

Arguments

x

An object.

Value

A flag indicating whether x is a numeric object or inherits from S3 class nlist or nlists.

Functions

  • is_nlist(): Is nlist

  • is_nlists(): Is nlists

Examples

# is_numeric
is_numeric(list(x = 1))
is_numeric(1)

# is_nlist
is_nlist(1)
is_nlist(list(x = 1))
is_nlist(nlist(x = 1))

# is_nlists
is_nlists(nlist(x = 1))
is_nlists(nlists(nlist(x = 2), nlist(x = 3.5)))

nlist documentation built on June 8, 2025, 9:41 p.m.