vector_check: Title Check if the object is a vector or not

Description Usage Arguments Value Examples

View source: R/vector_check.R

Description

Title Check if the object is a vector or not

Usage

1

Arguments

object

Vector to be tested.

length

Expected length.

Value

True or False. Vector of length 1 is not treated as a vector, thus returning false, unless the specified length is 1.

Examples

1
2
3
4
5
vector_check(object = c(1)) == FALSE
vector_check(object = c(1), length = 1) == TRUE
vector_check(object = c(1, 1)) == TRUE
vector_check(object = c(1, 2), length = 2) == TRUE
vector_check(object = c(1, 1), length = 1) == FALSE

nathanxli/BayesPD documentation built on June 18, 2020, 4:38 a.m.