Skip to content

Latest commit

 

History

History
73 lines (48 loc) · 1.6 KB

File metadata and controls

73 lines (48 loc) · 1.6 KB

Introduction

collectivedyn is an R package for simulating and analyzing collective dynamics on networks.
It provides a modular library of discrete maps and continuous ODEs, network coupling schemes, adaptive rules, and utilities to generate and visualize multivariate time series.


Features

  • Canonical models: Logistic, Hénon, Duffing, Chua, Lorenz, Rössler, ARMA, Harmonic, Kuramoto, Double-well
  • Network coupling: weighted graphs via igraph, flexible coupling matrices, linear diffusion
  • Adaptive rules: degree-biased rewiring, state-based adaptation, random flips
  • Integration: discrete maps and ODEs via deSolve
  • Utilities: plotting multi-time-series (plot_MultiTS), distortion transformations, toy graph generators, hashed filenames

Installation

From GitHub (development version):

# install.packages("devtools")
devtools::install_github("yourname/collectivedyn")

Example

library(collectivedyn)
library(igraph)

# Generate a small test network
g <- erdos.renyi.game(10, 0.3)
E(g)$weight <- 1

# Simulate Lorenz dynamics for 20 steps
x <- LORENZ_r(g, size = 20)

# Convert to matrix and plot
mat <- MultiTS2Matrix(x)
plot_MultiTS(x)

Documentation

After installation, full function help is available in R:

?LORENZ_r
?KURAMOTO_r
?adapt_adjacency_matrix

Testing

Tests are provided using testthat:

devtools::test()

License

MIT License (see LICENSE) © 2025 Manlio De Domenico