Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rdpeng/queue
Simple On-Disk Queue in R
https://github.com/rdpeng/queue
Last synced: 3 months ago
JSON representation
Simple On-Disk Queue in R
- Host: GitHub
- URL: https://github.com/rdpeng/queue
- Owner: rdpeng
- Created: 2017-08-24T04:14:04.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-06-07T19:10:10.000Z (over 2 years ago)
- Last Synced: 2024-08-13T07:15:11.407Z (5 months ago)
- Language: R
- Size: 60.5 KB
- Stars: 24
- Watchers: 6
- Forks: 9
- Open Issues: 1
-
Metadata Files:
- Readme: README.Rmd
Awesome Lists containing this project
- jimsghstars - rdpeng/queue - Simple On-Disk Queue in R (R)
README
---
output: github_document
---```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```# queue
The goal of queue is to provide a simple on-disk queue data structure in R.
## Installation
You can install queue from github with:
```{r gh-installation, eval = FALSE}
# install.packages("remotes")
remotes::install_github("rdpeng/queue")
```## Example
This is a basic example which shows you how to solve a common problem:
```{r example}
library(queue)
x <- create_queue("myqueue")
is_empty(x)## Queue up some items
enqueue(x, 1)
enqueue(x, 2)## Look at the head of the queue
peek(x)## Retrieve some items
dequeue(x)
dequeue(x)is_empty(x)
delete_queue(x)
```