Skip to content

Commit

Permalink
Getting ready for release
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavdelius committed Jun 8, 2020
1 parent c268f39 commit 4559b4d
Show file tree
Hide file tree
Showing 13 changed files with 117 additions and 59 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Authors@R: c(person("Gustav", "Delius", email="[email protected]",
comment = c(ORCID = "0000-0002-8478-3430")),
person("Richard", "Southwell", email="[email protected]",
role=c("ctb", "cph")))
Version: 2.0.1.9002
Version: 2.0.2
License: GPL-3
Imports:
assertthat,
Expand Down
3 changes: 3 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,11 @@ export(project)
export(project_simple)
export(removeComponent)
export(resource_constant)
export(resource_encounter)
export(resource_params)
export(resource_semichemostat)
export(retune_erepro)
export(semichemostat)
export(setColours)
export(setComponent)
export(setExtMort)
Expand All @@ -161,6 +163,7 @@ export(sigmoid_length)
export(sigmoid_weight)
export(species_params)
export(steady)
export(test_dyn)
export(truncated_lognormal_pred_kernel)
export(upgradeParams)
export(upgradeSim)
Expand Down
13 changes: 7 additions & 6 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# mizer 2.0.1.9002
# mizer 2.0.2

## Bug fixes

* Time passed to rate functions is now the actual time, not the time elapsed
since start of simulation.
* Time passed to rate functions is now the actual simulation time, not the time
elapsed since start of simulation.
* `upgradeParams()` works also on params objects that were created with a
development version of mizer.
* When upgrading an older params object, `upgradeParams()` does a better job at
guessing the value for `w_pp_cutoff`.
* `getFeedingLevel()`, `getPredMort()`, `setInitialValues()` and `steady()` now
works also when model has extra components.
work also when model has extra components.
* The critical feeding level lines are now mentioned in the legend of
`plotFeedinglevel()` when called with `include_critical = TRUE`, see #162.
* Avoid annoying warnings from dplyr package when `species_params` is a tibble.
Expand All @@ -36,7 +36,8 @@
time steps. This might be useful to extension writers.
* The `...` argument to `project()` is passed on to the dynamics and rate
functions.
* `steady()` runs faster using `project_simple()`.
* `steady()` runs faster by using `project_simple()`.
* Documentation on mizer website now has a search bar.


# mizer 2.0.1
Expand All @@ -57,7 +58,7 @@ renaming
* `r_resource` -> `resource_rate`
* `K_resource` -> `resource_capacity`

## New functionality
## Minor enhancements

* New functions `other_params()<-` and `other_params()` for setting and
getting other parameters, for example to be used in user-defined rate
Expand Down
13 changes: 12 additions & 1 deletion R/extension.R
Original file line number Diff line number Diff line change
Expand Up @@ -274,20 +274,31 @@ finalNOther <- function(sim) {
n_other
}

#' Dummy functions used during testing only
#' Dummy function used during testing only
#'
#' @param params A MizerParams object
#' @param ... Other parameters
#' @export
test_dyn <- function(params, ...) {
111
}
#' Dummy function used during testing only
#'
#' @inheritParams resource_constant
#' @inheritParams constant_other
#' @param ... Unused
#' @export
semichemostat <- function(params, n_other, rates, dt, component, ...) {
c <- params@other_params[[component]]
interaction <- params@species_params$interaction_resource
mort <- as.vector(interaction %*% rates$pred_rate)
tmp <- c$rate * c$capacity / (c$rate + mort)
return(tmp - (tmp - n_other[[component]]) * exp(-(c$rate + mort) * dt))
}
#' Dummy function used during testing only
#'
#' @inheritParams resource_constant
#' @export
resource_encounter <- function(params, n, n_pp, n_other, ...) {
mizerEncounter(params, n = n, n_pp = n_other$resource, ...)
}
5 changes: 5 additions & 0 deletions R/steady.R
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,11 @@ retune_erepro <- function(params, species = species_params(params)$species) {


#' Helper function to keep other components constant
#'
#' @param params MizerParams object
#' @param n_other Abundances of other components
#' @param component Name of the component that is being updated
#' @param ... Unused
#' @export
constant_other <- function(params, n_other, component, ...) {
n_other[[component]]
Expand Down
2 changes: 1 addition & 1 deletion R/summary_methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ NULL
#' available biomass. Outside the range of sizes for a predator species the
#' returned rate is zero.
#'
#' @param params A MizerParams object
#' @inheritParams getEncounter
#' @param proportion If TRUE (default) the function returns the diet as a
#' proportion of the total consumption rate. If FALSE it returns the
#' consumption rate in grams.
Expand Down
2 changes: 1 addition & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@

0 errors ✓ | 0 warnings ✓ | 0 notes ✓

* win-builder (devel, release and oldrelease)
* win-builder (release and oldrelease)
No Notes, Warnings or Errors
68 changes: 22 additions & 46 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
@@ -1,92 +1,85 @@
Acad
Algolia
allometrically
backreaction
Bertalanffy
Beverton
Beyer
bycatch
camelCase
Canales
catchabilities
catchability
Catchability
cdot
Cefas
chemostatic
cjfas
Collingridge
color
colors
com
Conseil
cran
csv
cutoff
cutoffs
cW
Datta
Deepfishman
Deepwater
DEFINEIT
Defra
demersal
detritivores
detritivorous
devtools
dialog
discretisation
discretises
DK
DP
Docsearch
doi
DP
dplyr
dropdown
dt
DTU
du
dw
EBFM
eq
Eq
erepro
eqn
etc
eu
faf
feces
fft
Foerster
frac
func
getEncounter
getERepro
getFeedingLevel
getGrowthCurves
getM
getMort
getResourceMort
getPredMort
getResourceMort
gganimate
ggplot
github
Github
GitHubPages
harddrive
Hinzen
Holling
ht
iframe
ij
inf
Inf
infty
int
io
ip
IPSC
iR
ji
jp
knitr
ks
Lenfest
LFI
linecolour
linetype
linetypes
macroflora
Mariella
Marifish
McKendrick
McKendrik
md
MERP
Expand All @@ -95,46 +88,37 @@ MESOPP
metab
minouw
MINOUW
mizer's
mizerExamples
mizerExperimental
MizerParams
MizerSim
modeled
modeling
mort
MSY
muf
mup
mupp
MvF
MVF
navbar
nb
ncolumns
nrows
Oceanologica
offs
org
packageDescription
parameterisations
parameterise
params
Pedersen
Piet
pkgdown
PLoS
plotBiomass
plotFeedingLevel
plotFMort
plotGrowthCurves
plotly
Plotly
plotPredMort
ppmr
pred
Proc
proj
propto
R's
R’s
rdd
Expand All @@ -144,54 +128,46 @@ Rdoc
reexports
Ren
repro
res
Ricker
rmarkdown
Rmarkdown
Rmax
RMarkdown
Rmd
roxygen
Roxygen
roxygenize
Rp
Rstudio
RStudio
RStudio's
Sandeel
Sci
sel
selectivities
semichemostat
setparams
setParams
Sheperd
shinytest
sigmoidal
sim
Sinica
sIZE
sizer
sizespectrum
sp
spawners
srr
SRR
SRRs
SSB
stackoverflow
std
subfunctions
Szuwalski
testthat
th
tibble
tidyverse
tol
trophic
Trophic
tt
u
unfished
Ursin
vb
vdiffr
vol
WMAT
www
Xue
zooplanktivorous
9 changes: 9 additions & 0 deletions man/constant_other.Rd

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

9 changes: 8 additions & 1 deletion man/getDiet.Rd

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

Loading

0 comments on commit 4559b4d

Please sign in to comment.