empty: Check if an rstack, rdeque, or rpqueue is empty

Description Usage Arguments Details Value Examples

Description

Check if an rstack, rdeque, or rpqueue is empty.

Usage

1
empty(x, ...)

Arguments

x

rstack, rdeque, or rpqueue to check.

...

additional arguments to be passed to or from methods (ignored).

Details

Runs in O(1) time for all types.

Value

logical vector of length 1.

Examples

1
2
3
4
s <- rstack()
print(empty(s))        ## TRUE
s <- insert_top(s, "a")
print(empty(s))        ## FALSE


Search within the rstackdeque package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.