Skip to content

Commit 528173c

Browse files
committed
chore(docstrings): corrections to the create_..._trajectory and sample_routing docstrings
1 parent db9212c commit 528173c

File tree

6 files changed

+12
-10
lines changed

6 files changed

+12
-10
lines changed

R/create_asu_trajectory.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#' parameter is used.
66
#' @param param Nested list containing simulation parameters. Must have
77
#' structure `param$asu_routing$<patient_type>` containing the probability of
8-
#' routing to each destination (e.g.`param$asu_routing_stroke$rehab = 0.24`).
8+
#' routing to each destination (e.g.`param$asu_routing$stroke$rehab = 0.24`).
99
#'
1010
#' @importFrom simmer trajectory
1111
#'

R/create_rehab_trajectory.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
#' one of: "stroke", "tia", "neuro", or "other". Determines which arrival rate
55
#' parameter is used.
66
#' @param param Nested list containing simulation parameters. Must have
7-
#' structure `param$asu_routing$<patient_type>` containing the probability of
8-
#' routing to each destination (e.g.`param$asu_routing_stroke$rehab = 0.24`).
7+
#' structure `param$rehab_routing$<patient_type>` containing the probability of
8+
#' routing to each destination (e.g.`param$rehab_routing$stroke$esd = 0.40`).
99
#'
1010
#' @importFrom simmer trajectory
1111
#'

R/sample_routing.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
#' Sample a destination based on probabilities
22
#'
33
#' Randomly selects a destination from a list, where each destination has an
4-
#' associated probability.
4+
#' associated probability. The destination is returned as a numeric index, as
5+
#' `simmer::set_attribute()` requires a numeric or function.
56
#'
67
#' @param prob_list Named list. The names are destination labels (character),
78
#' and the values are their corresponding probabilities (numeric, non-negative,
89
#' sum to 1).
910
#'
10-
#' @return A character string. The name of the selected destination.
11+
#' @return An integer. The index of the selected destination within `prob_list`.
1112
#' @export
1213

1314
sample_routing <- function(prob_list) {

man/create_asu_trajectory.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/create_rehab_trajectory.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/sample_routing.Rd

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)