Learn R Programming

⚠️There's a newer version (0.3.7) of this package.Take me there.

High Performance Container Data Types

Documentation: http://randy3k.github.io/collections

Provides high performance container data types such as Queue, Stack, Deque, Dict and OrderedDict. Benchmarks https://randy3k.github.io/collections/articles/benchmark.html have shown that these containers are asymptotically more efficient than those offered by other packages.

Related R packages

dequer implements double ended queues and it supports arbitrary R objects. However, it uses R_PreserveObject and R_ReleaseObject heavily which could be an issue for long queues.

datastructures uses ‘Boost’ and ‘STL’ data types to implement queues and hashmaps. For some reasons, it is often slow as shown in the benchmark.

liqueueR implements queues in pure R code.

hash uses R environment to create hash tables. As indicated by the author of fastmap, a small amount of memory may be leaked.

hashmap provides hashmap for atomic vectors using boost library.

fastmap provides hashmap which does not leak memory. The current implementation of collection::Dict is actually inspired by it. However, a more efficient hash table library tommy is used.

Copy Link

Version

Install

install.packages('collections')

Monthly Downloads

14,367

Version

0.2.5

License

MIT + file LICENSE

Maintainer

Randy Lai

Last Published

March 15th, 2020

Functions in collections (0.2.5)

Stack

Stack
collections-package

collections: High Performance Container Data Types
StackL

StackL (R implementation)
PriorityQueue

Priority Queue
QueueL

QueueL (R implementation)
OrderedDictL

Ordered Dictionary (R implementation)
OrderedDict

Ordered Dictionary
Queue

Queue
DictL

Dictionary (R implementation)
Dict

Dictionary
Deque

Double Ended Queue
DequeL

Double Ended Queue (R implementation)