datastructures

datastructures: An R package for organisation and storage of data - Published in JOSS (2018)

https://github.com/dirmeier/datastructures

Science Score: 95.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
    Found .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README and JOSS metadata
  • Academic publication links
  • Committers with academic emails
    1 of 2 committers (50.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

algorithms datastructures r rcpp
Last synced: 4 months ago · JSON representation

Repository

:rocket: Implementation of core data structures for R

Basic Info
Statistics
  • Stars: 80
  • Watchers: 7
  • Forks: 7
  • Open Issues: 9
  • Releases: 7
Topics
algorithms datastructures r rcpp
Created over 8 years ago · Last pushed over 2 years ago
Metadata Files
Readme Changelog License

README.md

datastructures

Project Status Project Life ci codecov CRAN

Implementation of core data structures for R.

Introduction

Implementation of advanced data structures such as hashmaps, heaps, or queues in R. Advanced data structures are essential in many computer science and statistics problems, for example graph algorithms or string analysis. The package uses Boost and STL data types and extends these to R with Rcpp modules.

So far datastructures has implementations for:

  • Fibonacci and binomial heaps,
  • queues and stacks,
  • hashmaps, multimaps and bimaps.

As an introductory example, imagine that you want to compute shortest paths on a graph and decide to use a Fibonacci heap for keeping the distances. A Fibonacci heap is an efficient tree-like data structure that satisfies the min-heap property. We can use it to quickly get the node with the shortest distance in O(log n) time like this:

```R fh <- fibonacci_heap("numeric") node.labels <- paste0("n", 10:1) node.distances <- seq(1, 0, length.out=length(node.labels)) fh <- insert(fh, node.distances, node.labels)

peek(fh) $0 [1] "n1" ```

datastructures also allows storing non-orimitive objects, like data.frames, matrices or environments. For instance, we could use a hashmap for storing such objects:

```R hm <- hashmap("integer") keys <- 1:2 values <- list( environment(), data.frame(A=rbeta(3, .5, .5), B=rgamma(3, 1))) hm[keys] <- values

hm[1L] [[1]] ```

Installation

Get the package from CRAN using:

R install.packages("datastructures")

You can also download the tarball of the latest release and install with:

bash R CMD install <datastructures-x.y.z.tar.gz>

where <datastructures-x.y.z.tar.gz> is your downloaded tarball. If you want to you can also use devtools, but I don't recommend it since it might give unstable versions:

R devtools::install_github("dirmeier/datastructures")

Documentation

Load the library using library(datastructures). We provide a vignette for the package that can be called using: vignette("datastructures"). If there are any questions let met know.

Citation

If you want to cite datastructures, please use the following entry:

Dirmeier, Simon (2018). datastructures: An R package for organisation and storage of data. Journal of Open Source Software, 3(28), 910, https://doi.org/10.21105/joss.00910

Feature requests and contributing

If you want to have another datastructure added, say from boost or the STL, just open up a new issue. Alternatively it would be great if you provided a PR.

Author

Owner

  • Name: Simon Dirmeier
  • Login: dirmeier
  • Kind: user
  • Location: Zurich, Switzerland
  • Company: @SwissDataScienceCenter

ML research @SwissDataScienceCenter

JOSS Publication

datastructures: An R package for organisation and storage of data
Published
August 27, 2018
Volume 3, Issue 28, Page 910
Authors
Simon Dirmeier ORCID
Department of Biosystems Science and Engineering, ETH Zurich
Editor
Karthik Ram ORCID
Tags
datastructures Boost

GitHub Events

Total
  • Watch event: 1
Last Year
  • Watch event: 1

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 146
  • Total Committers: 2
  • Avg Commits per committer: 73.0
  • Development Distribution Score (DDS): 0.048
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
dirmeier s****r@b****h 139
Simon Dirmeier s****r@w****e 7
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 17
  • Total pull requests: 2
  • Average time to close issues: 2 months
  • Average time to close pull requests: N/A
  • Total issue authors: 11
  • Total pull request authors: 2
  • Average comments per issue: 3.18
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • dirmeier (3)
  • fabian-s (3)
  • talgalili (2)
  • MilesMcBain (1)
  • vgherard (1)
  • wlandau (1)
  • multimeric (1)
  • kvak (1)
  • Marc-Ruebsam (1)
  • yushuf (1)
  • randy3k (1)
Pull Request Authors
  • fkohrt (1)
  • MichaelChirico (1)
Top Labels
Issue Labels
bug (1) wontfix (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 328 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 3
  • Total versions: 8
  • Total maintainers: 1
cran.r-project.org: datastructures

Implementation of Core Data Structures

  • Versions: 8
  • Dependent Packages: 0
  • Dependent Repositories: 3
  • Downloads: 328 Last month
Rankings
Stargazers count: 5.3%
Forks count: 10.1%
Dependent repos count: 17.6%
Average: 20.1%
Dependent packages count: 29.8%
Downloads: 37.7%
Maintainers (1)
Last synced: 4 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.3 depends
  • Rcpp * depends
  • methods * imports
  • purrr * imports
  • knitr * suggests
  • lintr * suggests
  • rmarkdown * suggests
  • styler * suggests
  • testthat * suggests
.github/workflows/ci.yaml actions
  • actions/checkout v1 composite
  • r-lib/actions/setup-pandoc master composite
  • r-lib/actions/setup-r master composite