back | R Documentation |
Access the last element in a container without removing it.
back(x)
x |
A CppQueue, CppVector, CppDeque, or CppList object. |
In a CppQueue, the last element is the last inserted one.
Returns the last element.
front, top, push_back, emplace_back, pop_back.
q <- cpp_queue(1:4)
q
# First element: 1
back(q)
# [1] 4
l <- cpp_list(1:4)
l
# 1 2 3 4
back(l)
# [1] 4
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.