powered by
Access the last element in a container without removing it.
back(x)
Returns the last element.
A CppQueue, CppVector, CppDeque, or CppList object.
In a CppQueue, the last element is the last inserted one.
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
Run the code above in your browser using DataLab