is.vector2: Vector testing for humans (tm)

View source: R/predicates.R

is.vector2R Documentation

Vector testing for humans (tm)

Description

returns TRUE only if x is atomic, not NULL, and with NULL dim. It should be useful in function programming, in order to check parameter (are they vector in the common sense meaning of the word?)

Usage

is.vector2(x)

Arguments

x

object to be tested

Examples

elem_list <- list(logical = logical(),
                  integer = integer(),
                  numeric = numeric(),
                  complex = complex(),
                  char = character(),
                  raw = raw(),
                  null = NULL,
                  matrix = matrix(1:10, 2),
                  list = list(),
                  expression = expression(),
                  pairlist = pairlist(),  
                  pairlist1 = pairlist(1))
lapply(elem_list, is.vector2)

lbraglia/lbmisc documentation built on April 29, 2024, 11:27 a.m.