Skip to content

Commit

Permalink
Merge pull request #288 from SamikDatta/master
Browse files Browse the repository at this point in the history
Using ratio by default for plotBiomassObservedVsModel...
  • Loading branch information
gustavdelius authored Apr 10, 2024
2 parents e350640 + 49dea1b commit 18860c5
Show file tree
Hide file tree
Showing 115 changed files with 9,918 additions and 488 deletions.
5 changes: 3 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Authors@R: c(person("Gustav", "Delius", email="gustav.delius@york.ac.uk",
comment = c(ORCID = "0000-0002-8478-3430")),
person("Richard", "Southwell", email="richard.southwell@york.ac.uk",
role=c("ctb", "cph")))
Version: 2.5.1
Version: 2.5.1.9000
License: GPL-3
Imports:
assertthat,
Expand All @@ -41,7 +41,7 @@ LinkingTo: Rcpp
Depends:
R (>= 3.1)
Suggests:
testthat (>= 2.1.0),
testthat (>= 3.0.0),
vdiffr,
roxygen2,
knitr,
Expand Down Expand Up @@ -112,3 +112,4 @@ BugReports: https://github.com/sizespectrum/mizer/issues
Language: en-GB
RdMacros: lifecycle
VignetteBuilder: knitr
Config/testthat/edition: 3
7 changes: 7 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## Updating default values for plotBiomassObservedVsModel

The function `plotBiomassObservedVsModel` now plots the ratio of modelled
to observed biomass as default (`ratio = T`), as this is more useful visually to
see how far off modelled biomass is from observed biomass.


# mizer 2.5.1

This is a patch release made necessary by a change in CRAN's requirement
Expand Down
2 changes: 1 addition & 1 deletion R/MizerParams-class.R
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@ validParams <- function(params) {
assert_that(is(params, "MizerParams"))

if (needs_upgrading(params)) {
params <- upgradeParams(params)
params <- suppressWarnings(upgradeParams(params))
warning("Your MizerParams object was created with an earlier version of mizer. You can upgrade it with `params <- upgradeParams(params)` where you should replace `params` by the name of the variable that holds your MizerParams object.")
}

Expand Down
4 changes: 2 additions & 2 deletions R/plotBiomassObservedVsModel.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#' with the species indices, or a logical vector indicating for each species
#' whether it is to be included (TRUE) or not.
#' @param ratio Whether to plot model biomass vs. observed biomass (FALSE) or
#' the ratio of model : observed biomass (TRUE). Default is FALSE.
#' the ratio of model : observed biomass (TRUE). Default is TRUE.
#' @param log_scale Whether to plot on the log10 scale (TRUE) or not (FALSE).
#' For the non-ratio plot this applies for both axes, for the ratio plot only
#' the x-axis is on the log10 scale. Default is TRUE.
Expand Down Expand Up @@ -62,7 +62,7 @@
#'
#' # Show the ratio instead
#' plotBiomassObservedVsModel(params, ratio = TRUE)
plotBiomassObservedVsModel <- function(object, species = NULL, ratio = FALSE,
plotBiomassObservedVsModel <- function(object, species = NULL, ratio = TRUE,
log_scale = TRUE, return_data = FALSE,
labels = TRUE, show_unobserved = FALSE) {

Expand Down
2 changes: 1 addition & 1 deletion man/animateSpectra.Rd

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

Binary file modified man/figures/Beverton-Holt-plot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions man/getBiomass.Rd

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

4 changes: 2 additions & 2 deletions man/getDiet.Rd

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

4 changes: 2 additions & 2 deletions man/getEGrowth.Rd

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

2 changes: 1 addition & 1 deletion man/getERepro.Rd

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

2 changes: 1 addition & 1 deletion man/getEReproAndGrowth.Rd

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

2 changes: 1 addition & 1 deletion man/getESpawning.Rd

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

4 changes: 2 additions & 2 deletions man/getEncounter.Rd

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

2 changes: 1 addition & 1 deletion man/getFMort.Rd

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

2 changes: 1 addition & 1 deletion man/getFMortGear.Rd

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

4 changes: 2 additions & 2 deletions man/getFeedingLevel.Rd

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

4 changes: 2 additions & 2 deletions man/getGrowthCurves.Rd

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

4 changes: 2 additions & 2 deletions man/getM2.Rd

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

4 changes: 2 additions & 2 deletions man/getM2Background.Rd

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

4 changes: 2 additions & 2 deletions man/getMort.Rd

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

4 changes: 2 additions & 2 deletions man/getN.Rd

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

4 changes: 2 additions & 2 deletions man/getPredMort.Rd

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

4 changes: 2 additions & 2 deletions man/getPredRate.Rd

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

4 changes: 2 additions & 2 deletions man/getRDD.Rd

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

4 changes: 2 additions & 2 deletions man/getRDI.Rd

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

4 changes: 2 additions & 2 deletions man/getRates.Rd

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

4 changes: 2 additions & 2 deletions man/getResourceMort.Rd

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

4 changes: 2 additions & 2 deletions man/getSSB.Rd

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

4 changes: 2 additions & 2 deletions man/getZ.Rd

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

4 changes: 2 additions & 2 deletions man/mizerEGrowth.Rd

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

2 changes: 1 addition & 1 deletion man/mizerERepro.Rd

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

2 changes: 1 addition & 1 deletion man/mizerEReproAndGrowth.Rd

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

Loading

0 comments on commit 18860c5

Please sign in to comment.