Package: mizer 2.5.1.9003

Gustav Delius

mizer: Dynamic Multi-Species Size Spectrum Modelling

A set of classes and methods to set up and run multi-species, trait based and community size spectrum ecological models, focused on the marine environment.

Authors:Gustav Delius [cre, aut, cph], Finlay Scott [aut, cph], Julia Blanchard [aut, cph], Ken Andersen [aut, cph], Richard Southwell [ctb, cph]

mizer_2.5.1.9003.tar.gz
mizer_2.5.1.9003.zip(r-4.5)mizer_2.5.1.9003.zip(r-4.4)mizer_2.5.1.9003.zip(r-4.3)
mizer_2.5.1.9003.tgz(r-4.4-x86_64)mizer_2.5.1.9003.tgz(r-4.4-arm64)mizer_2.5.1.9003.tgz(r-4.3-x86_64)mizer_2.5.1.9003.tgz(r-4.3-arm64)
mizer_2.5.1.9003.tar.gz(r-4.5-noble)mizer_2.5.1.9003.tar.gz(r-4.4-noble)
mizer_2.5.1.9003.tgz(r-4.4-emscripten)mizer_2.5.1.9003.tgz(r-4.3-emscripten)
|mizer.html
mizer/json (API)
NEWS

# Install 'mizer' in R:
install.packages('mizer', repos = c('https://sizespectrum.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/sizespectrum/mizer/issues

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:
  • NS_interaction - Example interaction matrix for the North Sea example
  • NS_params - Example MizerParams object for the North Sea example
  • NS_sim - Example MizerSim object for the North Sea example
  • NS_species_params - Example species parameter set based on the North Sea
  • NS_species_params_gears - Example species parameter set based on the North Sea with different gears
  • inter - Alias for 'NS_interaction'

On CRAN:

ecosystem-modelfish-population-dynamicsfisheriesfisheries-managementmarine-ecosystempopulation-dynamicssimulationsize-structurespecies-interactionstransport-equation

253 exports 36 stars 3.53 score 81 dependencies 4 mentions 236 scripts 466 downloads

Last updated 21 days agofrom:ea3ae441ee. Checks:ERROR: 1 NOTE: 8. Indexed: yes.

TargetResultDate
Doc / VignettesFAILAug 28 2024
R-4.5-win-x86_64NOTEAug 28 2024
R-4.5-linux-x86_64NOTEAug 28 2024
R-4.4-win-x86_64NOTEAug 28 2024
R-4.4-mac-x86_64NOTEAug 28 2024
R-4.4-mac-aarch64NOTEAug 28 2024
R-4.3-win-x86_64NOTEAug 28 2024
R-4.3-mac-x86_64NOTEAug 28 2024
R-4.3-mac-aarch64NOTEAug 28 2024

Exports:addSpeciesage_matanimateSpectrabalance_resource_logisticbalance_resource_semichemostatBevertonHoltRDDbox_pred_kernelcalc_selectivitycalculated_species_paramscalibrateBiomasscalibrateNumbercalibrateYieldcatchabilitycatchability<-compareParamscompleteSpeciesParamsconstant_otherconstantEggRDIconstantRDDcustomFunctiondefault_pred_kernel_paramsdefaults_editiondistanceMaxRelRDIdistanceSSLogNdouble_sigmoid_lengthdwdw_fullemptyParamsext_encounterext_encounter<-ext_mortext_mort<-finalNfinalNOtherfinalNResourcegear_paramsgear_params<-get_f0_defaultget_gamma_defaultget_h_defaultget_initial_nget_ks_defaultget_phiget_size_range_arrayget_time_elementsgetBiomassgetCatchabilitygetColoursgetCommunitySlopegetComponentgetCriticalFeedingLevelgetDietgetEffortgetEGrowthgetEncountergetEReprogetEReproAndGrowthgetESpawninggetExtEncountergetExtMortgetFeedingLevelgetFMortgetFMortGeargetGrowthCurvesgetInitialEffortgetInteractiongetLinetypesgetM2getM2BackgroundgetMaturityProportiongetMaxIntakeRategetMeanMaxWeightgetMeanWeightgetMetabolicRategetMetadatagetMortgetNgetParamsgetPhiPreygetPredKernelgetPredMortgetPredRategetProportionOfLargeFishgetRateFunctiongetRatesgetRDDgetRDIgetReproductionLevelgetReproductionProportiongetResourceCapacitygetResourceDynamicsgetResourceLevelgetResourceMortgetResourceRategetSearchVolumegetSelectivitygetSSBgetTimesgetYieldgetYieldGeargetZgiven_species_paramsgiven_species_params<-idxFinalTinitial_effortinitial_effort<-initialNinitialN<-initialNOtherinitialNOther<-initialNResourceinitialNResource<-intake_maxintake_max<-interaction_matrixinteraction_matrix<-knife_edgel2wlog_breakslognormal_pred_kernelmatchBiomassesmatchGrowthmatchNumbersmatchYieldsmaturitymaturity<-meltmetabmetab<-mizerEGrowthmizerEncountermizerERepromizerEReproAndGrowthmizerFeedingLevelmizerFMortmizerFMortGearmizerMortMizerParamsmizerPredMortmizerPredRatemizerRatesmizerRDImizerResourceMortMizerSimNnewCommunityParamsnewMultispeciesParamsnewSingleSpeciesParamsnewTraitParamsnoRDDNOtherNResourceother_paramsother_params<-plotplotBiomassplotBiomassObservedVsModelplotDataFrameplotDietplotFeedingLevelplotFMortplotGrowthCurvesplotlyBiomassplotlyBiomassObservedVsModelplotlyFeedingLevelplotlyFMortplotlyGrowthCurvesplotlyPredMortplotlySpectraplotlyYieldplotlyYieldGearplotlyYieldObservedVsModelplotM2plotPredMortplotSpectraplotYieldplotYieldGearplotYieldObservedVsModelpower_law_pred_kernelpred_kernelpred_kernel<-projectproject_simpleprojectToSteadyreadParamsremoveComponentremoveSpeciesrenameSpeciesrepro_proprepro_prop<-resource_capacityresource_capacity<-resource_constantresource_dynamicsresource_dynamics<-resource_levelresource_level<-resource_logisticresource_paramsresource_params<-resource_rateresource_rate<-resource_semichemostatRickerRDDsaveParamsscaleModelsearch_volsearch_vol<-selectivityselectivity<-set_community_modelset_multispecies_modelset_species_param_defaultset_trait_modelsetBevertonHoltsetColourssetComponentsetExtEncountersetExtMortsetFishingsetInitialValuessetInteractionsetLinetypessetMaxIntakeRatesetMetabolicRatesetMetadatasetParamssetPredKernelsetRateFunctionsetReproductionsetResourcesetRmaxsetSearchVolumeSheperdRDDsigmoid_lengthsigmoid_weightspecies_paramsspecies_params<-steadysteadySingleSpeciessummarytruncated_lognormal_pred_kernelupgradeParamsupgradeSimvalid_gears_argvalid_species_argvalidEffortVectorvalidGearParamsvalidParamsvalidSpeciesParamsww_fullw2l

Dependencies:askpassassertthatbase64encbslibcachemclicolorspacecpp11crayoncrosstalkcurldata.tabledeSolvedigestdplyrevaluatefansifarverfastmapfontawesomefsgenericsggplot2ggrepelgluegtablehighrhmshtmltoolshtmlwidgetshttrisobandjquerylibjsonliteknitrlabelinglaterlatticelazyevallifecyclelubridatemagrittrMASSMatrixmemoisemgcvmimemunsellnlmeopensslpillarpkgconfigplotlyplyrprettyunitsprogresspromisespurrrR6rappdirsRColorBrewerRcppreshape2rlangrmarkdownsassscalesstringistringrsystibbletidyrtidyselecttimechangetinytexutf8vctrsviridisLitewithrxfunyaml

Getting started with mizer

Rendered frommizer.Rmdusingknitr::rmarkdownon Aug 28 2024.

Last update: 2024-03-08
Started: 2019-04-07

Readme and manuals

Help Manual

Help pageTopics
mizer: Multi-species size-based modelling in Rmizer-package mizer
Add new speciesaddSpecies
Calculate age at maturityage_mat
Calculate age at maturity from von Bertalanffy growth parametersage_mat_vB
Animation of the abundance spectraanimateSpectra
Beverton Holt function to calculate density-dependent reproduction rateBevertonHoltRDD
Box predation kernelbox_pred_kernel
Calculate selectivity from gear parameterscalc_selectivity
Calibrate the model scale to match total observed biomasscalibrateBiomass
Calibrate the model scale to match total observed numbercalibrateNumber
Calibrate the model scale to match total observed yieldcalibrateYield
Compare two MizerParams objects and print out differencescompareParams
Complete species parameter data frame with default valuescompleteSpeciesParams
Helper function to keep other components constantconstant_other
Choose egg production to keep egg density constantconstantEggRDI
Give constant reproduction rateconstantRDD
Replace a mizer function with a custom versioncustomFunction
Set defaults for predation kernel parametersdefault_pred_kernel_params
Default editionsdefaults_edition
Check whether two objects are differentdifferent
Measure distance between current and previous state in terms of RDIdistanceMaxRelRDI
Measure distance between current and previous state in terms of fish abundancesdistanceSSLogN
Length based double-sigmoid selectivity functiondouble_sigmoid_length
Create empty MizerParams object of the right sizeemptyParams
Size spectra at end of simulationfinalN finalNResource
Values of other ecosystem components at end of simulationfinalNOther
Gear parametersgear_params gear_params<-
Get default value for f0get_f0_default
Get default value for gammaget_gamma_default
Calculate initial population abundancesget_initial_n
Get default value for 'ks'get_ks_default
Get values from feeding kernel functionget_phi
Determine reproduction rate needed for initial egg abundanceget_required_reproduction
Get size range arrayget_size_range_array
Get_time_elementsget_time_elements
Calculate the total biomass of each species within a size range at each time step.getBiomass
Calculate the slope of the community abundancegetCommunitySlope
Get information about other ecosystem componentsgetComponent
Get critical feeding levelgetCriticalFeedingLevel
Get diet of predator at size, resolved by prey speciesgetDiet
Fishing effort used in simulationgetEffort
Get energy rate available for growthgetEGrowth
Get encounter rategetEncounter
Get energy rate available for reproductiongetERepro
Get energy rate available for reproduction and growthgetEReproAndGrowth
Alias for 'getERepro()'getESpawning
Get feeding levelgetFeedingLevel
Get the total fishing mortality rate from all fishing gears by time, species and size.getFMort
Get the fishing mortality by time, gear, species and sizegetFMortGear
Get growth curves giving weight as a function of agegetGrowthCurves
Alias for 'getPredMort()'getM2
Alias for 'getResourceMort()'getM2Background
Calculate the mean maximum weight of the communitygetMeanMaxWeight
Calculate the mean weight of the communitygetMeanWeight
Get total mortality rategetMort
Calculate the number of individuals within a size rangegetN
Extract the parameter object underlying a simulationgetParams
Get available energygetPhiPrey
Get total predation mortality rategetPredMort
Get predation rategetPredRate
Calculate the proportion of large fishgetProportionOfLargeFish
Get all ratesgetRates
Get density dependent reproduction rategetRDD
Get density independent rate of egg productiongetRDI
Get reproduction levelgetReproductionLevel
Get predation mortality rate for resourcegetResourceMort
Calculate the SSB of speciesgetSSB
Times for which simulation results are availablegetTimes
Calculate the rate at which biomass of each species is fishedgetYield
Calculate the rate at which biomass of each species is fished by each geargetYieldGear
Alias for 'getMort()'getZ
Time index at end of simulationidxFinalT
Description of indicator functionsindicator_functions
Initial fishing effortinitial_effort initial_effort<- validEffortVector
Initial values for fish spectrainitialN initialN<-
Initial values for other ecosystem componentsinitialNOther initialNOther<-
Initial value for resource spectruminitialNResource initialNResource<-
Alias for 'NS_interaction'inter
Weight based knife-edge selectivity functionknife_edge
Length-weight conversionl2w w2l
Lognormal predation kernellognormal_pred_kernel
Match biomasses to observationsmatchBiomasses
Adjust model to produce observed growthmatchGrowth
Match numbers to observationsmatchNumbers
Match yields to observationsmatchYields
Get energy rate available for growth needed to project standard mizer modelmizerEGrowth
Get encounter rate needed to project standard mizer modelmizerEncounter
Get energy rate available for reproduction needed to project standard mizer modelmizerERepro
Get energy rate available for reproduction and growth needed to project standard mizer modelmizerEReproAndGrowth
Get feeding level needed to project standard mizer modelmizerFeedingLevel
Get the total fishing mortality rate from all fishing gearsmizerFMort
Get the fishing mortality needed to project standard mizer modelmizerFMortGear
Get total mortality rate needed to project standard mizer modelmizerMort
Alias for 'set_multispecies_model()'MizerParams
A class to hold the parameters for a size based model.MizerParams-class
Get total predation mortality rate needed to project standard mizer modelmizerPredMort
Get predation rate needed to project standard mizer modelmizerPredRate
Get all rates needed to project standard mizer modelmizerRates
Get density-independent rate of reproduction needed to project standard mizer modelmizerRDI
Get predation mortality rate for resource needed to project standard mizer modelmizerResourceMort
Constructor for the 'MizerSim' classMizerSim
A class to hold the results of a simulationMizerSim-class
Time series of size spectraN NResource
Determine whether a MizerParams or MizerSim object needs to be upgradedneeds_upgrading
Set up parameters for a community-type modelnewCommunityParams
Set up parameters for a general multispecies modelnewMultispeciesParams
Set up parameters for a single species in a power-law backgroundnewSingleSpeciesParams
Set up parameters for a trait-based multispecies modelnewTraitParams
Give density-independent reproduction ratenoRDD
Time series of other componentsNOther
Example interaction matrix for the North Sea exampleNS_interaction
Example MizerParams object for the North Sea exampleNS_params
Example MizerSim object for the North Sea exampleNS_sim
Example species parameter set based on the North SeaNS_species_params
Example species parameter set based on the North Sea with different gearsNS_species_params_gears
Summary plot for 'MizerSim' objectsplot,MizerParams,missing-method plot,MizerSim,missing-method
Plot the biomass of species through timeplotBiomass plotlyBiomass
Plotting observed vs. model biomass dataplotBiomassObservedVsModel plotlyBiomassObservedVsModel
Plot diet, resolved by prey species, as function of predator at size.plotDiet
Plot the feeding level of species by sizeplotFeedingLevel plotlyFeedingLevel
Plot total fishing mortality of each species by sizeplotFMort plotlyFMort
Plot growth curvesplotGrowthCurves plotlyGrowthCurves
Alias for 'plotPredMort()'plotM2
Plot predation mortality rate of each species against sizeplotlyPredMort plotPredMort
Plot the abundance spectraplotlySpectra plotSpectra
Description of the plotting functionsplotting_functions
Plot the total yield of species through timeplotlyYield plotYield
Plot the total yield of each species by gear through timeplotlyYieldGear plotYieldGear
Plotting observed vs. model yieldsplotlyYieldObservedVsModel plotYieldObservedVsModel
Power-law predation kernelpower_law_pred_kernel
Project size spectrum forward in timeproject
Project abundances by a given number of time steps into the futureproject_simple
Project to steady stateprojectToSteady
Remove speciesremoveSpecies
Rename speciesrenameSpecies
Keep resource abundance constantresource_constant
Project resource using logistic modelbalance_resource_logistic resource_logistic
Resource parametersresource_params resource_params<-
Project resource using semichemostat modelbalance_resource_semichemostat resource_semichemostat
Ricker function to calculate density-dependent reproduction rateRickerRDD
Save a MizerParams object to file, and restore itreadParams saveParams
Change scale of the modelscaleModel
Deprecated function for setting up parameters for a community-type modelset_community_model
Deprecated obsolete function for setting up multispecies parametersset_multispecies_model
Set a species parameter to a default valueset_species_param_default
Deprecated function for setting up parameters for a trait-based modelset_trait_model
Set Beverton-Holt reproduction without changing the steady statesetBevertonHolt
Set line colours and line types to be used in mizer plotsgetColours getLinetypes setColours setLinetypes
Add a dynamical ecosystem componentremoveComponent setComponent
Set external encounter rateext_encounter ext_encounter<- getExtEncounter setExtEncounter
Set external mortality rateext_mort ext_mort<- getExtMort setExtMort
Set fishing parameterscatchability catchability<- getCatchability getInitialEffort getSelectivity selectivity selectivity<- setFishing
Set initial values to values from a simulationsetInitialValues
Set species interaction matrixinteraction_matrix interaction_matrix<- setInteraction
Set maximum intake rategetMaxIntakeRate intake_max intake_max<- setMaxIntakeRate
Set metabolic rategetMetabolicRate metab metab<- setMetabolicRate
Set metadata for a modelgetMetadata setMetadata
Set or change any model parameterssetParams
Set predation kernelgetPredKernel pred_kernel pred_kernel<- setPredKernel
Set own rate function to replace mizer rate functiongetRateFunction other_params other_params<- setRateFunction
Set reproduction parametersgetMaturityProportion getReproductionProportion maturity maturity<- repro_prop repro_prop<- setReproduction
Set resource dynamicsresource_capacity resource_capacity<- resource_dynamics resource_dynamics<- resource_level resource_level<- resource_rate resource_rate<- setResource
Alias for 'setBevertonHolt()'setRmax
Set search volumegetSearchVolume search_vol search_vol<- setSearchVolume
Sheperd function to calculate density-dependent reproduction rateSheperdRDD
Length based sigmoid selectivity functionsigmoid_length
Weight based sigmoidal selectivity functionsigmoid_weight
Species parameterscalculated_species_params given_species_params given_species_params<- species_params species_params<-
Set initial values to a steady state for the modelsteady
Set initial abundances to single-species steady state abundancessteadySingleSpecies
Description of summary functionssummary_functions
Summarize MizerParams objectsummary,MizerParams-method
Summarize MizerSim objectsummary,MizerSim-method
Truncated lognormal predation kerneltruncated_lognormal_pred_kernel
Upgrade MizerParams object from earlier mizer versionsupgradeParams
Upgrade MizerSim object from earlier mizer versionsupgradeSim
Helper function to assure validity of gears argumentvalid_gears_arg
Helper function to assure validity of species argumentvalid_species_arg
Check validity of gear parameters and set defaultsvalidGearParams
Validate MizerParams object and upgrade if necessary using 'upgradeParams()'.validParams
Validate species parameter data framevalidSpeciesParams
Size binsdw dw_full w w_full