Learn R Programming

ospsuite.utils (version 1.2.0)

isOfLength: Check if the provided object has nbElements elements

Description

Check if the provided object has nbElements elements

Usage

isOfLength(object, nbElements)

Arguments

object

An object or a list of objects

nbElements

number of elements that are supposed in object

Value

TRUE if the object or all objects inside the list have nbElements.

Examples

Run this code
# NOT RUN {
df <- data.frame(x = c(1, 2, 3))
isOfLength(df, 1)
isOfLength(df, 3)
# }

Run the code above in your browser using DataLab