The R Journal: article published in 2015, volume 7:1

Implementing Persistent O(1) Stacks and Queues in R PDF download
Shawn T. O’Neil , The R Journal (2015) 7:1, pages 118-126.

Abstract True to their functional roots, most R functions are side-effect-free, and users expect datatypes to be persistent. However, these semantics complicate the creation of efficient and dynamic data structures. Here, we describe the implementation of stack and queue data structures satisfying these conditions in R, available in the CRAN package rstackdeque. Guided by important work in purely functional languages, we look at both partiallyand fully-persistent versions of queues, comparing their performance characteristics. Finally, we illustrate the usefulness of such dynamic structures with examples of generating and solving mazes.

Received: 2014-12-16; online 2015-06-24
CRAN packages: rstackdeque, dplyr, microbenchmark, ggplot2, hash, Rcpp
CRAN Task Views implied by cited CRAN packages: Graphics, HighPerformanceComputing, NumericalMathematics, Phylogenetics


CC BY 4.0
This article is licensed under a Creative Commons Attribution 3.0 Unported license .

@article{RJ-2015-009,
  author = {Shawn T. O’Neil},
  title = {{Implementing Persistent O(1) Stacks and Queues in R}},
  year = {2015},
  journal = {{The R Journal}},
  doi = {10.32614/RJ-2015-009},
  url = {https://doi.org/10.32614/RJ-2015-009},
  pages = {118--126},
  volume = {7},
  number = {1}
}