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()
).
You can install:
the latest released version from CRAN with
R
install.packages("GillespieSSA2")
the latest development version from github with
R
devtools::install_github("rcannood/GillespieSSA2", build_vignettes = TRUE)
If you encounter a bug, please file a minimal reproducible example on the issues page.
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") } }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.