Skip to content

Commit 530d78b

Browse files
more docs help
1 parent ace5fd2 commit 530d78b

File tree

5 files changed

+20
-6
lines changed

5 files changed

+20
-6
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: macpan2
22
Title: Fast and Flexible Compartmental Modelling
3-
Version: 1.15.2
3+
Version: 1.15.3
44
Authors@R: c(
55
person("Steve Walker", email="[email protected]", role=c("cre", "aut")),
66
person("Weiguang Guan", role="aut"),

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ export(mp_layout_grid)
235235
export(mp_layout_paths)
236236
export(mp_ledgers)
237237
export(mp_linear)
238+
export(mp_list_models)
238239
export(mp_log)
239240
export(mp_log_normal)
240241
export(mp_logit)

R/make_model_index.R

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,13 @@ mp_show_models <- function(
100100
#' @export
101101
show_models = mp_show_models
102102

103+
#' @describeIn mp_show_models Return a character vector containing model
104+
#' names, instead of a data frame with more information about each model.
105+
#' @export
106+
mp_list_models = function(dir = system.file("starter_models", package = "macpan2")) {
107+
mp_show_models(dir)$Directory
108+
}
109+
103110
model_link = function(model_name, macpan_library = "starter_models") {
104111
sprintf(
105112
"[%s](https://github.com/canmod/macpan2/tree/main/inst/%s/%s)"
@@ -110,8 +117,8 @@ model_link = function(model_name, macpan_library = "starter_models") {
110117

111118
#' Browse Model Docs
112119
#'
113-
#' Open a browser at the current version of a particular model in a
114-
#' `macpan2` model library.
120+
#' Open a browser at the current version of a particular model in an
121+
#' online `macpan2` model library.
115122
#'
116123
#' @param model_name Name of a model in the `macpan_library`.
117124
#' @param macpan_library Name of a library. Currently, the default value of
@@ -132,7 +139,7 @@ mp_model_docs = function(model_name, macpan_library = "starter_models") {
132139
, "doesn't exist at all (i.e., the URL you visit doesn't exist)"
133140
, "or because your version of macpan2 is not sufficiently current"
134141
, "(i.e., you might want to install an update). A list of installed"
135-
, "models can be obtained using mp_show_models()."
142+
, "models can be obtained using mp_list_models()."
136143
) |> warning()
137144
}
138145
url = sprintf(

man/mp_model_docs.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/mp_show_models.Rd

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

0 commit comments

Comments
 (0)