check_netlogo_version: Check NetLogo versions

View source: R/download_netlogo.R

check_netlogo_versionR Documentation

Check NetLogo versions

Description

Auxiliary function to check a NetLogo version number against the tested versions

Usage

check_netlogo_version(version, throw_error = FALSE)

Arguments

version

Character string naming which NetLogo Version to check

throw_error

TRUE/FALSE, if TRUE untested versions are reported (see details)

Details

With throw_error = TRUE a version that is not among the tested ones is reported according to how likely it is to work:

  • NetLogo 7.0.0 or newer: a warning. Simulations are executed by 'logolink', so untested releases are likely to run; set check_version = FALSE in nl to silence it.

  • NetLogo below 7.0.0: an error. Support for these versions was removed in nlrx 0.5.0, so simulations cannot run at all. The error points to nlrx 0.4.6, the last version supporting NetLogo 5.3.1 to 6.4.0, which can be installed from GitHub with remotes::install_github("ropensci/nlrx@v0.4.6").

  • A string that is not a version number: an error.

Value

logical, TRUE if the version is one of supported_netlogo_versions

Examples

## Not run: 
check_netlogo_version("7.0.0")
check_netlogo_version("1.0")
check_netlogo_version("1.0", TRUE)

## End(Not run)


nlrx documentation built on Nov. 25, 2026, 5:09 p.m.