check-scalar-isVectorish: Is the input vector(ish)?

check-scalar-isVectorishR Documentation

Is the input vector(ish)?

Description

Is the input vector(ish)?

Usage

isVectorish(x, nullOk = FALSE)

Arguments

x

Object.

nullOk

logical(1). If set to TRUE, x may also be NULL.

Details

Intentionally returns TRUE for some other vector-like classes, including factor, and Rle.

Value

TRUE on success; FALSE on failure, with cause set.

Note

Updated 2022-12-14.

Examples

## TRUE ====
isVectorish(character())
isVectorish(factor())
isVectorish(integer())
isVectorish(logical())
isVectorish(S4Vectors::Rle())

## FALSE ====
isVectorish(data.frame())
isVectorish(matrix())
isVectorish(S4Vectors::DataFrame())

steinbaugh/goalie documentation built on Jan. 17, 2024, 5:16 p.m.