Skip to content

Latest commit

 

History

History
50 lines (36 loc) · 546 Bytes

README.md

File metadata and controls

50 lines (36 loc) · 546 Bytes

stacker

A simple stack for R

# install.packages("remotes")
remotes::install_github("devOpifex/stacker")

Example

This is a basic example which shows you how to solve a common problem:

library(stacker)

s <- Stack$new()

s$push(1)
s$push(2)
s$push(3)

s$read()
#> [[1]]
#> [1] 1
#> 
#> [[2]]
#> [1] 2
#> 
#> [[3]]
#> [1] 3

s$pop()

s$top()
#> [1] 2
s$read()
#> [[1]]
#> [1] 1
#> 
#> [[2]]
#> [1] 2