powered by
Access first element in a container without removing it.
front(x)
Returns the front element.
A CppQueue, CppVector, CppDeque, CppForwardList, or CppList object.
back, emplace_front, pop, pop_front, push_front.
q <- cpp_queue(4:6) q # First element: 4 front(q) # [1] 4 q # First element: 4 v <- cpp_vector(c(TRUE, FALSE, FALSE)) v # TRUE FALSE FALSE front(v) # [1] TRUE
Run the code above in your browser using DataLab