| front | R Documentation |
Access first element in a container without removing it.
front(x)
x |
A CppQueue, CppVector, CppDeque, CppForwardList, or CppList object. |
Returns the front element.
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.