Skip to content
/ rstack Public

❗ This is a read-only mirror of the CRAN R package repository. rstack — Stack Data Type as an 'R6' Class. Homepage: https://github.com/gaborcsardi/rstack#readme Report bugs for this package: https://github.com/gaborcsardi/rstack/issues

License

Notifications You must be signed in to change notification settings

cran/rstack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rstack

Stack data type as an ‘R6’ class

Project Status: Active - The project has reached a stable, usable state and is being actively developed. R-CMD-check CRAN RStudio mirror downloads Coverage Status

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.

Installation

source("https://install-github.me/gaborcsardi/rstack")

Usage

library(rstack)
S <- stack$new()
S$push(1L)
S$peek()
#> [1] 1
S$pop()
#> [1] 1
S$size()
#> [1] 0
S$push(NULL)
S$push(iris)
colnames(S$pop())
#> [1] "Sepal.Length" "Sepal.Width"  "Petal.Length" "Petal.Width"  "Species"
S$peek()
#> NULL

License

MIT © Mango Solutions, Gábor Csárdi

About

❗ This is a read-only mirror of the CRAN R package repository. rstack — Stack Data Type as an 'R6' Class. Homepage: https://github.com/gaborcsardi/rstack#readme Report bugs for this package: https://github.com/gaborcsardi/rstack/issues

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages