Learn R Programming

cppcontainers (version 1.0.4)

empty: Check emptiness

Description

Check, if a container is empty, i.e. does not contain elements.

Usage

empty(x)

Value

Returns TRUE, if the container is empty, and FALSE otherwise.

Arguments

x

A cppcontainers object.

Examples

Run this code
v <- cpp_vector(4:6)
v
# 4 5 6

clear(v)
empty(v)
# [1] TRUE

Run the code above in your browser using DataLab