Skip to content

devOpifex/stacker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

No packages published