Skip to content

Commit

Permalink
Rename parameter outputRows to timesteps
Browse files Browse the repository at this point in the history
Renaming the parameter was ill-thought, because I forgot that the exact name of
the formal parameters is necessarily tied to the argument matching functionality
of doCall and the input widgets in ashokkrish/episim. Rename the parameter back
to the proper symbol.
  • Loading branch information
bryce-carson committed Jun 27, 2024
1 parent 6632953 commit d72c9a0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: ehpi
Title: A Basic Compartmental Epidemic Modelling API
Version: 0.6.0
Version: 0.7.0
Language: en-CA
Authors@R:
c(person(given = "Bryce", family = "Carson",
Expand Down
10 changes: 5 additions & 5 deletions R/epi.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@
#' @param trueMassAction Whether the force of infection is scaled by the
#' population or not.
#'
#' @param outputRows The number of output rows in the simulation.
#' @param timesteps The number of output rows in the simulation.
#' @param timeIncrement The number of increments of "time" that pass between
#' each output row.
#'
#' @returns A dataframe with a column for each enabled compartment and a column
#' for time, with `outputRows` rows. Each row contains the values of the
#' for time, with `timesteps` rows. Each row contains the values of the
#' differential equations for each point in time of the model (per function
#' arguments).
#'
Expand All @@ -71,7 +71,7 @@
#' gamma = 0.0009,
#' sigma = 0.000001,
#' delta = 0.01,
#' outputRows = 230)
#' timesteps = 230)
#'
epi <-
function(## Initial state variables
Expand All @@ -85,7 +85,7 @@ epi <-
trueMassAction = FALSE,

## Simulation variables
outputRows = 25,
timesteps = 25,
timeIncrement = 1)
{
variables <- c(population, susceptible, exposed, infected, recovered, dead)
Expand Down Expand Up @@ -165,7 +165,7 @@ epi <-
## information to ensure the simulation runs accurately for a
## given amount of time and the desired number of "reporting
## periods."
seq(1, length = outputRows, by = timeIncrement),
seq(1, length = timesteps, by = timeIncrement),
## MAYBE FIXME: the differential equations don't use the time
## variable: should they?
differentialEquations,
Expand Down
8 changes: 4 additions & 4 deletions man/epi.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d72c9a0

Please sign in to comment.