dendronetwork

Package to create dendrochronological networks

https://github.com/ropensci/dendronetwork

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found 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
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (18.6%) to scientific vocabulary

Keywords

archaeology dendrochronology dendroprovenance network-analysis tree-rings
Last synced: 6 months ago · JSON representation ·

Repository

Package to create dendrochronological networks

Basic Info
Statistics
  • Stars: 7
  • Watchers: 2
  • Forks: 0
  • Open Issues: 0
  • Releases: 6
Topics
archaeology dendrochronology dendroprovenance network-analysis tree-rings
Created about 3 years ago · Last pushed 7 months ago
Metadata Files
Readme Changelog Contributing License Citation Codemeta

README.Rmd

---
output: github_document
bibliography: references.bib
csl: journal-of-computer-applications-in-archaeology.csl
---

# dendroNetwork 



[![Project Status: Active -- The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active) 
[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable) 
[![R-CMD-check](https://github.com/ropensci/dendroNetwork/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ropensci/dendroNetwork/actions/workflows/R-CMD-check.yaml) [![Status at rOpenSci Software Peer Review](https://badges.ropensci.org/627_status.svg)](https://github.com/ropensci/software-review/issues/627) 
[![dendroNetwork status badge](https://ropensci.r-universe.dev/badges/dendroNetwork)](https://ropensci.r-universe.dev) 
[![CRAN status](https://www.r-pkg.org/badges/version/dendroNetwork)](https://CRAN.R-project.org/package=dendroNetwork) 
[![Total CRAN Downloads](https://cranlogs.r-pkg.org/badges/grand-total/dendroNetwork)](https://cranlogs.r-pkg.org/badges/grand-total/dendroNetwork)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10636310.svg)](https://zenodo.org/doi/10.5281/zenodo.10636310)



```{r, echo = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-"
)
```

dendroNetwork is a package to create dendrochronological networks for gaining insight into provenance or other patterns based on the statistical relations between tree ring curves. The code and the functions are based on several published papers [@visser2021a; @visser2021b; @visser2022].

The package is written for dendrochronologists and have a general knowledge on the discipline and used jargon. There is an excellent website for the introduction of using R in dendrochronology: . The basics of dendrochronology can be found in handbooks [@speer2010; @cook1990] or on . A list of R-packages for dendrochronology can be found here: .

## Installation

This package depends on [RCy3](https://www.bioconductor.org/packages/release/bioc/html/RCy3.html), which is part of Bioconductor. Therefore it is recommended to install RCy3 first using:

``` r
if (!require("BiocManager", quietly = TRUE))
    install.packages("BiocManager")

BiocManager::install("RCy3")
```

The functionality of RCy3 depends on the installation of Cytoscape. Cytoscape is needed for visualising the networks. This open source software is platform independent and provides easy visual access to complex networks and the attributes of both nodes and edges in a network (see the [Cytoscape-website](https://cytoscape.org/what_is_cytoscape.html) for more information). It is therefore recommended to install Cytoscape as well. Please follow the download and installation instructions for your operating system: .

You can install the latest version of dendroNetwork from [CRAN](https://cran.r-project.org/package=dendroNetwork) or the development version from [R-universe](https://ropensci.r-universe.dev/dendroNetwork) by running one of the commands below:

``` r
# CRAN
install.packages("dendroNetwork")
# R-Universe
install.packages("dendroNetwork", repos = "https://ropensci.r-universe.dev")
```

## Usage {#usage}

The package aims to make the creation of dendrochronological (provenance) networks as easy as possible. To be able to make use of all options, it is assumed that Cytoscape [@shannon2003]is installed (). Some data is included in this package, namely the Roman data published by Hollstein [@hollstein1980].

The first steps are visualized in the flowchart below, including community detection using either (or both) the Girvan-Newman algorithm [@girvan2002] and Clique Percolation Method [@palla2005] for all clique sizes. Both methods are explained very well in the papers, and on wikipedia for both [CPM](https://en.wikipedia.org/wiki/Clique_percolation_method) and the [Girvan-Newman algorithm](https://en.wikipedia.org/wiki/Girvan%E2%80%93Newman_algorithm).

```{r flowchart_workflow, echo=FALSE, fig.width=15}
DiagrammeR::grViz("
digraph {
  # graph attributes
  graph [overlap = true]
  # node attributes
  node [shape = box,
        fontname = Helvetica,
        color = gray]
  # edge attributes
  edge [color = black]
  # node statements
  1 [label = 'Load data']
  2 [label = 'Create similarity table']
  3 [label = 'Create network using default settings']
  4 [label = 'Detect communities using the \n Girvan-Newman algorithm']
  5 [label = 'Detect communities using the \n Clique Percolation Method']
  # edge statements
  1 ->  2
  2 -> 3
  3 -> 4
  3 -> 5
  }
")
```

```{r network_hollstein_1980}
library(dendroNetwork)
data(hol_rom) # 1
sim_table_hol <- sim_table(hol_rom) # 2
g_hol <- dendro_network(sim_table_hol) # 3
g_hol_gn <- gn_names(g_hol) # 4
g_hol_cpm <- clique_community_names(g_hol, k=3) # 4
hol_com_cpm_all <- find_all_cpm_com(g_hol) # 5
plot(g_hol)  # plotting the graph in R
plot(g_hol, vertex.color="deepskyblue", vertex.size=15, vertex.frame.color="gray",
     vertex.label.color="darkslategrey", vertex.label.cex=0.8, vertex.label.dist=2) # better readable version
```

### Visualization in Cytoscape {#visualization_cytoscape}

After creating the network in R, it is possible to visualize the network using Cytoscape. The main advantage is that visualisation in Cytoscape is more easy, intuitive and visual. In addition, it is very easy to automate workflows in Cytoscape with R (using [RCy3](https://bioconductor.org/packages/release/bioc/html/RCy3.html)). For this purpose we need to start Cytoscape firstly. After Cytoscape has completely loaded, the next steps can be taken.

1.  The network can now be loaded in Cytoscape for further visualisation: `cyto_create_graph(g_hol, CPM_table = hol_com_cpm_all, GN_table = g_hol_gn)`
2.  Styles for visualisation can now be generated. However, Cytoscape comes with a lot of default styles that can be confusing. Therefore it is recommended to use: `cyto_clean_styles()` once in a session.
3.  To visualize the styles for CPM with only k=3: `cyto_create_cpm_style(g_hol, k=3, com_k = g_hol_cpm)`
    -   This can be repeated for all possible clique sizes. To find the maximum clique size in a network, please use: `igraph::clique_num(g_hol)`.
    -   To automate this: `for (i in 3:igraph::clique_num(g_hol)) { cyto_create_cpm_style(g_hol, k=i, com_k = g_hol_cpm)}`.
4.  To visualize the styles using the Girvan-Newman algorithm (GN): `cyto_create_gn_style(g_hol)` This would look something like this in Cytoscape:

![The network of Roman sitechronologies with the Girvan-Newman communities visualized.](man/figures/g_hol_GN.png)

## Usage for large datasets

When using larger datasets of tree-ring series, calculating the table with similarities can take a lot of time, but finding communities even more. It is therefore recommended to use of parallel computing for Clique Percolation: `clique_community_names_par(network, k=3, n_core = 4)`. This reduces the amount of time significantly. For most datasets `clique_community_names()` is sufficiently fast and for smaller datasets `clique_community_names_par()` can even be slower due to the parallelisation. Therefore, the function `clique_community_names()` should be used initially and if this is very slow, start using `clique_community_names_par()`. See the separate [vignette](https://docs.ropensci.org/dendroNetwork/articles/large_datasets_communities.html) for that.

## Citation

If you use this software, please cite this using:

Visser, R.M. (2025). dendroNetwork: a R-package to create dendrochronological provenance networks (Version 0.5.5) [Computer software]. 

## Acknowledgements

This package reuses and adapts the CliquePercolationMethod-R package developed by Angelo Salatino (The Open University). Source code: 

This package reuses and adapts the function cor.with.limit.R() developed by Andy Bunn (Western Washington University), but the new function is optimized and also outputs the number of overlapping rings. Source code: .

## References

Owner

  • Name: rOpenSci
  • Login: ropensci
  • Kind: organization
  • Email: info@ropensci.org
  • Location: Berkeley, CA

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it using the metadata from this file."
authors:
  - family-names: Visser
    given-names: Ronald M.
    orcid: https://orcid.org/0000-0001-6966-1729
title: "dendroNetwork: a R-package to create dendrochronological networks"
version: 0.5.5
doi: 10.5281/zenodo.10636310
date-released: "2025-07-25"
repository-code: "https://github.com/ropensci/dendroNetwork"
url: "https://docs.ropensci.org/dendroNetwork/"
license: GPL-3.0
keywords:
  - network-analysis
  - archaeology
  - dendrochronology
  - tree-rings
  - dendroprovenance
type: software

CodeMeta (codemeta.json)

{
  "@context": "https://doi.org/10.5063/schema/codemeta-2.0",
  "@type": "SoftwareSourceCode",
  "identifier": "dendroNetwork",
  "description": "This package makes it easy to create dendrochronological networks based on the similarity between tree-ring series or chronologies. It includes various functions to compare tree-ring curves building upon dplR. The networks can be used to visualise and understand the relations between tree-ring curves. These networks are also very useful to estimate the provenance or wood-use within a structure/context/site.",
  "name": "dendroNetwork: Create networks of dendrochronological series using pairwise similarity",
  "relatedLink": "https://ropensci.github.io/dendroNetwork/",
  "codeRepository": "https://github.com/ropensci/dendroNetwork",
  "issueTracker": "https://github.com/ropensci/dendroNetwork/issues",
  "license": "https://spdx.org/licenses/GPL-3.0",
  "version": "0.5.4",
  "programmingLanguage": {
    "@type": "ComputerLanguage",
    "name": "R",
    "url": "https://r-project.org"
  },
  "runtimePlatform": "R version 4.3.2 (2023-10-31 ucrt)",
  "author": [
    {
      "@type": "Person",
      "givenName": "Ronald",
      "familyName": "Visser",
      "email": "r.m.visser@saxion.nl",
      "@id": "https://orcid.org/0000-0001-6966-1729"
    }
  ],
  "contributor": [
    {
      "@type": "Person",
      "givenName": "Angelino",
      "familyName": "Salentino",
      "@id": "https://orcid.org/0000-0002-4763-3943"
    },
    {
      "@type": "Person",
      "givenName": "Andy",
      "familyName": "Bunn",
      "@id": "https://orcid.org/0000-0001-9027-2162"
    }
  ],
  "maintainer": [
    {
      "@type": "Person",
      "givenName": "Ronald",
      "familyName": "Visser",
      "email": "r.m.visser@saxion.nl",
      "@id": "https://orcid.org/0000-0001-6966-1729"
    }
  ],
  "softwareSuggestions": [
    {
      "@type": "SoftwareApplication",
      "identifier": "knitr",
      "name": "knitr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=knitr"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "rmarkdown",
      "name": "rmarkdown",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=rmarkdown"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "testthat",
      "name": "testthat",
      "version": ">= 3.0.0",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=testthat"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "DiagrammeR",
      "name": "DiagrammeR",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=DiagrammeR"
    }
  ],
  "softwareRequirements": {
    "1": {
      "@type": "SoftwareApplication",
      "identifier": "R",
      "name": "R",
      "version": ">= 4.1.0"
    },
    "2": {
      "@type": "SoftwareApplication",
      "identifier": "dplR",
      "name": "dplR",
      "version": ">= 1.7.2",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=dplR"
    },
    "3": {
      "@type": "SoftwareApplication",
      "identifier": "igraph",
      "name": "igraph",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=igraph"
    },
    "4": {
      "@type": "SoftwareApplication",
      "identifier": "stringr",
      "name": "stringr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=stringr"
    },
    "5": {
      "@type": "SoftwareApplication",
      "identifier": "reshape2",
      "name": "reshape2",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=reshape2"
    },
    "6": {
      "@type": "SoftwareApplication",
      "identifier": "RCy3",
      "name": "RCy3",
      "provider": {
        "@id": "https://www.bioconductor.org",
        "@type": "Organization",
        "name": "Bioconductor",
        "url": "https://www.bioconductor.org"
      },
      "sameAs": "https://bioconductor.org/packages/release/bioc/html/RCy3.html"
    },
    "7": {
      "@type": "SoftwareApplication",
      "identifier": "dplyr",
      "name": "dplyr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=dplyr"
    },
    "8": {
      "@type": "SoftwareApplication",
      "identifier": "RColorBrewer",
      "name": "RColorBrewer",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=RColorBrewer"
    },
    "9": {
      "@type": "SoftwareApplication",
      "identifier": "tidyr",
      "name": "tidyr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=tidyr"
    },
    "10": {
      "@type": "SoftwareApplication",
      "identifier": "foreach",
      "name": "foreach",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=foreach"
    },
    "11": {
      "@type": "SoftwareApplication",
      "identifier": "lifecycle",
      "name": "lifecycle",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=lifecycle"
    },
    "12": {
      "@type": "SoftwareApplication",
      "identifier": "doParallel",
      "name": "doParallel",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=doParallel"
    },
    "13": {
      "@type": "SoftwareApplication",
      "identifier": "stats",
      "name": "stats"
    },
    "14": {
      "@type": "SoftwareApplication",
      "identifier": "grDevices",
      "name": "grDevices"
    },
    "SystemRequirements": null
  },
  "fileSize": "9565.26KB",
  "releaseNotes": "https://github.com/ropensci/dendroNetwork/blob/master/NEWS.md",
  "readme": "https://github.com/ropensci/dendroNetwork/blob/main/README.md",
  "contIntegration": [
    "https://github.com/ropensci/dendroNetwork/actions/workflows/pkgcheck.yaml",
    "https://github.com/ropensci/dendroNetwork/actions/workflows/R-CMD-check.yaml"
  ],
  "developmentStatus": [
    "https://www.repostatus.org/#active",
    "https://lifecycle.r-lib.org/articles/stages.html#stable"
  ],
  "review": {
    "@type": "Review",
    "url": "https://github.com/ropensci/software-review/issues/627",
    "provider": "https://ropensci.org"
  },
  "keywords": [
    "archaeology",
    "dendrochronology",
    "dendroprovenance",
    "network-analysis",
    "tree-rings"
  ]
}

GitHub Events

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

Packages

  • Total packages: 1
  • Total downloads:
    • cran 306 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 2
  • Total maintainers: 1
cran.r-project.org: dendroNetwork

Create Networks of Dendrochronological Series using Pairwise Similarity

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 306 Last month
Rankings
Dependent packages count: 27.8%
Dependent repos count: 35.7%
Average: 49.5%
Downloads: 84.9%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v4 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
.github/workflows/pkgcheck.yaml actions
  • ropensci-review-tools/pkgcheck-action main composite
DESCRIPTION cran
  • R >= 3.5.0 depends
  • RColorBrewer * imports
  • RCy3 * imports
  • doParallel * imports
  • dplR >= 1.7.2 imports
  • dplyr * imports
  • foreach * imports
  • grDevices * imports
  • igraph * imports
  • lifecycle * imports
  • magrittr * imports
  • reshape2 * imports
  • stats * imports
  • stringr * imports
  • tidyr * imports
  • DiagrammeR * suggests
  • knitr * suggests
  • rmarkdown * suggests
  • testthat >= 3.0.0 suggests
.github/workflows/pkgdown.yaml actions
  • JamesIves/github-pages-deploy-action v4.5.0 composite
  • actions/checkout v4 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite