Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (16.4%) to scientific vocabulary
Repository
:ring: Ring buffers
Basic Info
- Host: GitHub
- Owner: mrc-ide
- License: other
- Language: R
- Default Branch: master
- Homepage: https://mrc-ide.github.io/ring
- Size: 2.26 MB
Statistics
- Stars: 11
- Watchers: 2
- Forks: 1
- Open Issues: 3
- Releases: 1
Metadata Files
README.md
ring
Ring buffers in R and C
Ring buffers (or circular buffers) are like arrays that seem circular; data is written and read in a first-in-first-out (FIFO) style, but once allocated subsequent writes do not cause memory allocations. Circular buffers are useful for collecting and processing data streams or for queues (with a fixed maximum size). I use them to implement a solver for delay differential equations in dde.
This package provides two implementations of ring buffers:
ring_buffer_env: a pure R ring buffer implemented as double linked list (using environments) that is genuinely a ring.ring_buffer_bytes: a ring buffer implemented as an array of bytes with a pair of pointers (in C). Each "element" of the array can be one or more bytes, but each must have a fixed size. There are two convenience interfaces:ring_buffer_bytes_translate: for cases where a raw->R and R->raw translation functions are providedring_buffer_bytes_typedfor cases where each element should correspond to a fixed-length vector of one of R's core numeric-ish types (logical,integer,numeric,complex)
Both buffer types can be used from R, and the code underlying ring_buffer_bytes can also be used compiled code in other packages using R's LinkingTo: support. A common set of methods is provided, though these do differ in some details.
Both buffer types will refuse to underflow (return elements beyond those that have been written). The behaviour on overflow can be controlled:
- overwrite old data: (the default), for a fixed-memory FIFO buffer
- grow buffer: expand the buffer geometrically to fit required elements (which will require additional memory allocations and copies)
- throw error: refuse to overflow
Depending on your application, these ring buffers may or may not be faster than manually copying data around in vectors. The benefit of this package rather than doing it by hand is abstracting away a lot of subtle bookkeeping and keeping an interface that is fairly high level. However, for C applications, using ring_buffer_bytes via the C interface (using LinkingTo) is likely to be very fast as it avoids all copies.
See the reference documentation for details.
Usage
The main package vignette (vignette("ring")) contains an introduction and basic usage.
A second vignette (vignette("ring_applications")) describes possible data structures using a ring buffer.
The reference documentation is also available online, or from the package.
License
MIT © Imperial College of Science, Technology and Medicine
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
Owner
- Name: MRC Centre for Global Infectious Disease Analysis
- Login: mrc-ide
- Kind: organization
- Location: London, UK
- Website: https://www.imperial.ac.uk/mrc-global-infectious-disease-analysis
- Repositories: 413
- Profile: https://github.com/mrc-ide
MRC Centre hosted within the Department of Infectious Disease Epidemiology at Imperial College London
GitHub Events
Total
Last Year
Committers
Last synced: about 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Rich FitzJohn | r****n@g****m | 252 |
Issues and Pull Requests
Last synced: 12 months ago
All Time
- Total issues: 13
- Total pull requests: 10
- Average time to close issues: 4 months
- Average time to close pull requests: 2 months
- Total issue authors: 2
- Total pull request authors: 3
- Average comments per issue: 0.85
- Average comments per pull request: 1.0
- Merged pull requests: 8
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: 14 days
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- richfitz (12)
- thibautjombart (1)
Pull Request Authors
- richfitz (9)
- olivroy (2)
- russellpierce (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 589 last-month
- Total docker downloads: 42,005
- Total dependent packages: 1
- Total dependent repositories: 2
- Total versions: 5
- Total maintainers: 1
cran.r-project.org: ring
Circular / Ring Buffers
- Homepage: https://mrc-ide.gitub.io/ring
- Documentation: http://cran.r-project.org/web/packages/ring/ring.pdf
- License: MIT + file LICENSE
-
Latest release: 1.0.6
published almost 2 years ago
Rankings
Maintainers (1)
Dependencies
- R6 * imports
- knitr * suggests
- rmarkdown * suggests
- testthat * suggests
- testthat * suggests
- actions/checkout v3 composite
- r-lib/actions/check-r-package v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
- JamesIves/github-pages-deploy-action v4.4.1 composite
- actions/checkout v3 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
- actions/checkout v3 composite
- actions/upload-artifact v3 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite