Aller au contenu principal
Accès ouvert déclaré 2026 software

mizer: Multi-Species Size Spectrum Modelling in R

0Citations signalées, ce qui n’est pas une note de qualité
0Institutions déclarées
0Pays d’affiliation déclarés

Le résumé fourni par la source

This release overhauls how species and resource parameters are set, makes the extension framework composable regardless of load order, adds a new adjustSizeGrid() function and cheatsheets, and includes a range of smaller improvements and bug fixes. For an overview see the release announcement on the mizer blog. Resource setting Assigning to resource_params() (or one of its components, e.g. resource_params(params)$kappa <- ...) now immediately rebuilds the size-dependent resource rate (rr_pp) and capacity (cc_pp) arrays from the scalars, leaving any manually set (frozen) arrays untouched, exactly as species_params<- feeds the species rates. As a result changing the rate-side scalars r_pp or n now takes effect (previously the value was silently discarded), and successive scalar edits accumulate instead of overwriting each other. Assigning to resource_params() no longer balances the resource; balancing to preserve the steady state is now solely a feature of setResource(). The resource_rate<-, resource_capacity<-, resource_level<- and resource_dynamics<- setters gained a balance argument (default unchanged) so it can be switched off, e.g. resource_capacity(params, balance = FALSE) <- my_capacity. setResource() no longer silently overwrites a manually set (frozen) rate or capacity array when balancing: the frozen array wins and a warning is issued. The one exception to the frozen-array protection is that steady() will rebalance the resource_capacity in order to return a steady state, ignoring any freeze. These changes and how to adapt existing code are described in the new vignette("upgrading") ("Upgrading mizer"). Species parameter changes Modifying species parameters via species_params<-() now automatically detects your changes, records them in given_species_params so they are protected from being overwritten by defaults in the future, and silently triggers the recalculation of any dependent parameters and rate arrays. Previously, species_params<-() bypassed the given_species_params protection and didn't trigger recalculations. This restores expected behaviour and makes species_params<-() the recommended setter for scripts. The given_species_params<-() setter remains as an explicit alternative that is particularly useful during interactive sessions, because it issues warnings if you change a parameter whose effect is overridden by another parameter that has already been given. Each species parameter default now has a single home: the rate-setting function that uses the parameter. validSpeciesParams() now only fills in defaults for parameters that no single rate setter owns, namely w_max, w_repro_max, w_mat, w_min, alpha, n, a, b and is_background. The defaults for p, k, z_ext, d, E_ext, D_ext and interaction_resource are supplied by setMetabolicRate(), setExtMort(), setExtEncounter(), setExtDiffusion() and setInteraction() respectively, where they were already being set. Built models are unaffected, because setParams() calls all the rate-setting functions, but validSpeciesParams() applied to a bare species parameter data frame now returns fewer columns. See the default_parameters vignette. The p argument of setMetabolicRate() is deprecated (#459). It never had any effect on a MizerParams object: such an object always has a p column already, and the argument was only ever used to fill in a missing one, so it was silently ignored. Set the species parameter instead, with species_params(params)$p <- value. The p argument of newMultispeciesParams() is a different argument and is not affected. The default for the metabolic exponent p is now n rather than 3/4 in setMetabolicRate(), which is where the default now lives; validSpeciesParams() no longer sets p. No model changes as a result. Models built with newMultispeciesParams() take p from its own p argument (default 0.7), which is injected into the species parameter table before validation and is untouched by this change, so neither of these defaults fires for them. The validSpeciesParams() default (p = n) only ever applied when it was called directly on a bare species parameter data frame, which now returns no p column, and it shadowed the setMetabolicRate() default whenever both were in play. Default values for the a (0.01) and b (3) species parameters (for the weight-length relationship) are now saved in species_params instead of being calculated internally by l2w() and w2l() only when needed. The species_params data frame is now an S3 subclass of data.frame (class = c("species_params", "data.frame")). It supports class-preserving subsetting and subassignment S3 methods, making it safer to use and paving the way for future auto-recalculations. Columns accessed via $ on a species_params or gear_params object now return named vectors, where the names are the species names (or "species, gear" row names for gear_params). For example, species_params(params)$w_mat now returns a named vector making it easier to identify entries. The species vector is left unnamed. When sel_func is set on a gear_params object, any argument columns required by that selectivity function (other than w, species_params, and ...) are now automatically added as NA columns. This means, for example, that setting gp$sel_func <- "sigmoid_length" immediately creates the l25 and l50 columns, ready to be filled in (#431). Misspelled column names in the gear_params and species_params data frames are now detected by fuzzy matching against the recognised parameter names. A near miss such as sel_fun (instead of sel_func) triggers a warning that suggests the intended name, rather than being silently ignored (#442). Columns are only flagged, never renamed, so legitimate custom columns are left untouched. See the new vignette("upgrading") ("Upgrading mizer") for how to adapt existing code to these changes. Extension framework An installed extension package is now recognised as a dispatching extension from the S3 methods it registers for its marker class (e.g. getEncounter.mizerMR), rather than only from a statically defined S4 marker class. This lets extension packages omit the static setClass("mizerFoo", contains = "MizerParams") and instead let mizer create the marker class dynamically when the package is loaded, inserting it at the correct place in the S4 hierarchy relative to any other extensions loaded in the session. As a result, two independently developed extension packages (for example mizerReef and mizerMR) can now be chained in either load order, which a static sibling-of-MizerParams class prevented. recordExtension() now prepends a genuinely new extension to the front of the object's @extensions chain, keeping it ordered outermost-first to match registerExtension(). Existing entries stay in place. New functions New adjustSizeGrid() function (an S3 generic) adjusts the size grid of a MizerParams object to a new minimum and/or maximum size. It can both expand and truncate (shrink) the grid. For each species it warns if truncation discards a non-negligible fraction of the species' biomass, of the diet of its smallest individuals, or of the diet of its largest individuals. Added a callback parameter to project() to allow user-defined functions to be called at each saved time step. Other improvements Mizer plots no longer produce the unhelpful warning "log-10 transformation introduced infinite values" when a logged axis contains zero values (#463). setColours() and setLinetypes() now also update the linecolour and linetype entries in species_params and given_species_params whenever a name being set coincides with a species name, so that the choice persists with the species rather than only living in the plotting slot. library(mizer) now prints a one-line startup message the first time you load a new mizer version, pointing you to news(package = "mizer"). It is shown at most once per version and never interrupts a session more than that. compareParams() now checks that the number of size bins, species and gears agree before comparing the array

Ce résumé expose les affirmations des auteurs. BNTIC ne l’interprète pas comme une validation indépendante des résultats.

Le contrôle bibliographique ouvert

La source scientifique ouverte est momentanément indisponible.

BNTIC News n’est pas le producteur de ces données. Les publications sont interrogées à la demande dans Crossref, OpenAIRE, DOAJ, Europe PMC, HAL, DataCite, AfricArXiv, ROR et la Banque mondiale, sans clé d’accès. OpenAlex reste optionnel. Aucun service payant n’est nécessaire et aucune donnée externe n’est enregistrée en base. Consulter les sources et leurs limites.