Implementing a Queue as a Reference Class
I am working on a simulation for an Automatic Repeat-reQuest (ARQ) algorithm. After trying various options, I concluded that I would need an implementation of a queue to make this problem tractable. R does not have a native queue data structure, so this seemed like a good opportunity to implement one and learn something about Reference Classes in the process.
The Implementation
We use setRefClass() to create a generator function which will create objects of the Queue class.
Read More →