| pushing | R Documentation | 
Add items to the front of a stack or deque via pop().  
Add items to the back of a queue or deque via popback().
push(x, data) ## S3 method for class 'deque' push(x, data) ## S3 method for class 'stack' push(x, data) pushback(x, data) ## S3 method for class 'deque' pushback(x, data) ## S3 method for class 'queue' pushback(x, data)
| x | A queue, stack, or deque. | 
| data | R object to insert at the front of the deque/stack. | 
Operates via side-effects; see examples for clarification on usage.
Returns NULL; insertion operates via side-effects.
## Not run: library(dequer) ### A simple queue example q <- queue() for (i in 1:3) pushback(q, i) str(q) ### A simple stack example s <- stack() for (i in 1:3) push(s, i) str(s) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.