https://github.com/ixpantia/orbweaver-r
Orbweaver is an R package that optimizes the processing of graph data structures.
https://github.com/ixpantia/orbweaver-r
graph-algorithms orbweaver r rextendr rust
Last synced: about 1 year ago
JSON representation
Orbweaver is an R package that optimizes the processing of graph data structures.
- Host: GitHub
- URL: https://github.com/ixpantia/orbweaver-r
- Owner: ixpantia
- License: other
- Created: 2023-11-06T23:54:41.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-14T18:07:42.000Z (over 1 year ago)
- Last Synced: 2025-03-14T19:22:07.726Z (over 1 year ago)
- Topics: graph-algorithms, orbweaver, r, rextendr, rust
- Language: R
- Homepage: https://ixpantia.github.io/orbweaver-r/
- Size: 95.5 MB
- Stars: 16
- Watchers: 2
- Forks: 9
- Open Issues: 1
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
[](https://cran.r-project.org/package=orbweaver)
[](https://github.com/ixpantia/orbweaver-r/actions/workflows/R-CMD-check.yaml)
## Overview
A fast R library for working with Nodes in a graph.
## Features
- Find shortest paths between nodes in a graph
- Find the common parents between selected nodes
- Directed Graph
- Directed Acyclic Graph
- It is quite fast
## Why not igraph?
[igraph](https://igraph.org/) is an amazing network analysis package.
igraph is much more mature and orbweaver focuses on extreme performance
and low latency operations. If you need super high performance
and do not require weighted graphs, orbweaver may be for you.

> We may add weighted graph in the future but for not
> it is not in the short-term road map.
## Installation
### Rust Toolchain
Before installing this package, you will need to install the
Rust toolchain.
#### Mac or Linux
If you are on Mac or Linux, you can do this
by running the following command in your terminal:
```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```
#### Windows
If you are on Windows, you can download the installer from
[here](https://www.rust-lang.org/tools/install).
In order to compile this package manually, you will need the
**GNU ABI** used by the **GCC toolchain**. This is not the
default on Windows, so you will need to install the
toolchain manually. You can do this by running the following
command in your terminal:
```bash
rustup toolchain install stable-gnu
```
If you are on Windows you may need to install `Rtools` as
well. You can download the installer from
[here](https://cran.r-project.org/bin/windows/Rtools/).
### R Package
You can install orbweaver from CRAN with:
```R
install.packages("orbweaver")
```
You can install orbweaver from GitHub with:
```R
# install.packages("remotes")
remotes::install_github("ixpantia/orbweaver-r")
```
## Example
```{r}
library(orbweaver)
edges <- data.frame(
parent = c("A", "B", "C", "C", "F"),
child = c("B", "C", "D", "E", "D")
)
graph <- graph_builder() |>
populate_edges(edges, "parent", "child") |>
build_directed()
graph
graph |> find_all_paths(from = "A", to = "D")
```
