Build and Run Spatially Explicit Agent-Based Models

Build and run spatially explicit agent-based models using only the R platform. 'NetLogoR' follows the same framework as the 'NetLogo' software (Wilensky (1999) < https://www.netlogo.org>) and is a translation in R of the structure and functions of 'NetLogo'. 'NetLogoR' provides new R classes to define model agents and functions to implement spatially explicit agent-based models in the R environment. This package allows benefiting of the fast and easy coding phase from the highly developed 'NetLogo' framework, coupled with the versatility, power and massive resources of the R software. Examples of two models from the NetLogo software repository (Ants < https://ccl.northwestern.edu/netlogo/models/Ants>) and Wolf-Sheep-Predation (< https://ccl.northwestern.edu/netlogo/models/WolfSheepPredation>), and a third, Butterfly, from Railsback and Grimm (2012) < https://www.railsback-grimm-abm-book.com/>, all written using 'NetLogoR' are available. The 'NetLogo' code of the original version of these models is provided alongside. A programming guide inspired from the 'NetLogo' Programming Guide (< https://docs.netlogo.org/programming.html>) and a dictionary of 'NetLogo' primitives (< https://docs.netlogo.org/dictionary.html>) equivalences are also available. NOTE: To increment 'time', these functions can use a for loop or can be integrated with a discrete event simulator, such as 'SpaDES' (< https://cran.r-project.org/package=SpaDES>).


NetLogoR

R build status CRAN_Status_Badge Downloads Codecov test coverage

Build and run spatially explicit agent-based models in R

NetLogoR is an R package to build and run spatially explicit agent-based models using only the R platform (Bauduin et al., 2019). It follows the same framework as NetLogo (Wilensky, 1999) and is a translation in R language of the structure and functions of NetLogo (NetLogo primitives). NetLogoR provides new R classes to define model agents and functions to implement spatially explicit agent-based models in the R environment. This package allows benefiting of the fast and easy coding phase from the highly developed NetLogo's framework, coupled with the versatility, power and massive resources of the R software.

Getting Started

Examples of three models (Ants, Butterfly (Railsback and Grimm, 2012) and Wolf-Sheep-Predation) written using NetLogoR are available. The NetLogo code of the original version of these models is provided alongside. A programming guide inspired from the NetLogo Programming Guide and a dictionary of NetLogo primitives equivalences are also available. A model simulating the wolf life cycle written using NetLogoR has been published (Bauduin et al., 2020) with the (code available on GitHub).

Installing NetLogoR

From CRAN

Currently, the package is not on CRAN due to some dependencies that were removed from CRAN. It will be there soon.

In the mean time, please use:

# install.packages("NetLogoR")
install.packages("NetLogoR", repos = c("https://predictiveecology.r-universe.dev", getOption("repos")))

From GitHub

#install.packages("devtools")
devtools::install_github("PredictiveEcology/NetLogoR")

Getting help

Please email developers or start an issue on the NetLogoR web page.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("NetLogoR")

1.0.6 by Eliot J B McIntire, a year ago


https://netlogor.predictiveecology.org, https://github.com/PredictiveEcology/NetLogoR/, https://groups.google.com/g/netlogor


Report a bug at https://github.com/PredictiveEcology/NetLogoR/issues


Browse source code at https://github.com/cran/NetLogoR


Authors: Sarah Bauduin [aut] , Eliot J B McIntire [aut, cre] (ORCID: , Alex M Chubaty [aut] , His Majesty the King in Right of Canada , as represented by the Minister of Natural Resources Canada [cph]


Documentation:   PDF Manual  


GPL-3 license


Imports data.table, grDevices, methods, quickPlot, stats, terra, utils

Suggests CircStats, covr, knitr, microbenchmark, raster, rmarkdown, sf, sp, SpaDES.core, SpaDES.tools, testthat, withr


See at CRAN