Skip to content

Commit 5fb6f2a

Browse files
committed
setExtEncounter() no longer resets the external encounter rate to zero when called without the ext_encounter argument.
1 parent 7a9220a commit 5fb6f2a

7 files changed

+15
-8
lines changed

DESCRIPTION

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Authors@R: c(person("Gustav", "Delius", email="[email protected]",
1919
comment = c(ORCID = "0000-0002-8478-3430")),
2020
person("Richard", "Southwell", email="[email protected]",
2121
role=c("ctb", "cph")))
22-
Version: 2.5.1.9001
22+
Version: 2.5.1.9002
2323
License: GPL-3
2424
Imports:
2525
assertthat,
@@ -103,7 +103,7 @@ Collate:
103103
'matchGrowth.R'
104104
'steadySingleSpecies.R'
105105
'defaults_edition.R'
106-
RoxygenNote: 7.3.1
106+
RoxygenNote: 7.3.2
107107
Roxygen: list(markdown = TRUE)
108108
Encoding: UTF-8
109109
LazyData: true

NEWS.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
## Updating default values for plotBiomassObservedVsModel
1+
# Development version
22

3-
The function `plotBiomassObservedVsModel` now plots the ratio of modelled
3+
- `setExtEncounter()` no longer resets the external encounter rate to zero when
4+
called without the `ext_encounter` argument.
5+
6+
- The function `plotBiomassObservedVsModel()` now plots the ratio of modelled
47
to observed biomass as default (`ratio = T`), as this is more useful visually to
58
see how far off modelled biomass is from observed biomass.
69

R/newMultispeciesParams.R

+1
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ newMultispeciesParams <- function(
236236
#' \item [setMaxIntakeRate()]
237237
#' \item [setMetabolicRate()]
238238
#' \item [setExtMort()]
239+
#' \item [setExtEncounter()]
239240
#' \item [setReproduction()]
240241
#' \item [setFishing()]
241242
#' \item [setResource()]

R/setExtEncounter.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
#'
1111
#' @param params MizerParams
1212
#' @param ext_encounter Optional. An array (species x size) holding the external
13-
#' encounter rate. If not supplied, a default of 0 is used.
13+
#' encounter rate. If not supplied, the external encounter rate is left
14+
#' unchanged. Initially is is set to 0.
1415
#' @param ... Unused
1516
#'
1617
#' @return `setExtEncounter()`: A MizerParams object with updated external encounter
@@ -36,7 +37,6 @@ setExtEncounter <- function(params, ext_encounter = NULL, ...) {
3637

3738
if (is.null(ext_encounter)) {
3839
ext_encounter <- params@ext_encounter
39-
ext_encounter[] <- 0
4040
}
4141

4242
assert_that(is.array(ext_encounter),

man/newMultispeciesParams.Rd

+2-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/setExtEncounter.Rd

+2-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/setParams.Rd

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)