Stack data type as an âR6â class
An extremely simple stack data type, implemented with âR6â classes. The size of the stack increases as needed, and the amortized time complexity is O(1). The stack may contain arbitrary objects.
Installationsource("https://install-github.me/gaborcsardi/rstack")
Usage
library(rstack)
S <- stack$new()
S$push(1L)
S$peek()
#> [1] 1
#> [1] 1
#> [1] 0
S$push(NULL)
S$push(iris)
colnames(S$pop())
#> [1] "Sepal.Length" "Sepal.Width" "Petal.Length" "Petal.Width" "Species"
#> NULL
License
MIT © Mango Solutions, Gábor Csárdi
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4