Free Access Week - Data Engineering + BI
Data Engineering and BI courses are free this week!
Free Access Week - Jun 2-8

nlist (version 0.4.0)

is_numeric: 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)

Value

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

Arguments

x

An object.

Functions

  • is_nlist(): Is nlist

  • is_nlists(): Is nlists

Examples

Run this code
# 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)))

Run the code above in your browser using DataLab