CRAN Status CRAN Downloads R-CMD-check DOI Coverage Status

GillespieSSA2: Gillespie's Stochastic Simulation Algorithm for impatient people.

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  out.width = "100%",
  fig.path = "man/figures/",
  message = FALSE,
  dpi = 300
)
set.seed(1)
submission_to_cran <- TRUE
library(tidyverse)

GillespieSSA2 is a fast, scalable, and versatile framework for simulating large systems with Gillespie's Stochastic Simulation Algorithm (SSA) [@Cannoodt2021]. This package is the spiritual successor to the GillespieSSA package originally written by Mario Pineda-Krch [@PinedaKrch2008].

GillespieSSA2 has the following added benefits:

The SSA methods currently implemented are: Exact (ssa_exact()), Explicit tau-leaping (ssa_etl()), and the Binomial tau-leaping (ssa_btl()).

Install

You can install:

If you encounter a bug, please file a minimal reproducible example on the issues page.

Examples

The following example models are available:

walk(
  list.files("vignettes", pattern = "*.Rmd"),
  function(file) {
    title <- 
      read_lines(paste0("vignettes/", file)) %>% 
      keep(~grepl("^title: ", .)) %>% 
      gsub("title: \"(.*)\"", "\\1", .)
    vignette_name <- gsub("\\.Rmd", "", file)
    markdown_name <- gsub("\\.Rmd", ".md", file)
    cat(
      "* ",
      ifelse(submission_to_cran, "", "["),
      title, 
      ifelse(submission_to_cran, "", paste0("](vignettes/", markdown_name, ")")),
      ":  \n",
      "`vignette(\"", vignette_name, "\", package=\"GillespieSSA2\")`\n",
      sep = ""
    )
  }
)
rerun_vignettes <- FALSE
if (rerun_vignettes) {
  for (file in list.files("vignettes", pattern = "*.Rmd", full.names = TRUE)) {
    cat("Running '", file, "'\n", sep = "")
    rmarkdown::render(file, output_format = "github_document")
  }
}

References



rcannood/GillespieSSA2 documentation built on Jan. 26, 2023, 8:33 p.m.