is_scalar: Test whether x is of length 1

Description Usage Arguments Value Examples

View source: R/predicates.R

Description

Test whether x is of length 1

Usage

1

Arguments

x

Object to be tested.

Value

Logical

Examples

1
2
3
is_scalar(1) # TRUE
is_scalar("a") # TRUE
is_scalar(c(1, 2)) # FALSE

HuraultMisc documentation built on Sept. 6, 2021, 9:09 a.m.