size {cppcontainers} | R Documentation |
Get container size
Description
Obtain the number of elements in a container.
Usage
size(x)
Arguments
x |
A CppSet, CppUnorderedSet, CppMultiset, CppUnorderedMultiset, CppMap, CppUnorderedMap, CppMultimap, CppUnorderedMultimap, CppStack, CppQueue, CppPriorityQueue, CppVector, CppDeque, or CppList object. |
Value
Returns a numeric.
See Also
bucket_count, capacity, load_factor, max_size, resize.
Examples
s <- cpp_unordered_set(4:6)
s
# 6 5 4
size(s)
# [1] 3
[Package cppcontainers version 1.0.0 Index]