The function opens a shiny gadget, an interactive web page. This page has a side panel with controls for various model parameters and a main panel with tabs for various diagnostic plots.
tuneParams( p, controls = list("egg", "predation", "fishing", "reproduction", "other", "interaction", "resource"), tabs = list("Spectra", "Biomass", "Catch", "Growth", "Repro", "Diet", "Death", "Resource", "Rates", "Prey", "Sim"), ... )
MizerParams object to tune. If missing, the gadget tries to recover information from log files left over from aborted previous runs.
A list with the names of input parameter control sections that should be displayed in the sidebar. See "Customisation" below.
A list with the names of the tabs that should be displayed in the main section. See "Customisation" below.
Other params needed by individual tabs.
The tuned MizerParams object
This gadget is meant for tuning a model to steady state. It is not meant for
tuning the dynamics of the model. That should be done in a second step using
There is an "Instructions" button near the top left of the gadget that gives you a quick overview of the user interface.
After you click the "Done" button in the side panel, the function will return
the parameter object in the state at that time, with
Rmax set to
erepro set to the value it had after the last run to steady state.
At any time the gadget allows the user to download the current params object as an .rds file via the "Download" button in the "File" section, or to upload a params object from an .rds file.
The gadget keeps a log of all steady states you create while working with the gadget. You can go back to the last steady state by hitting the "Undo" button. You can go back an arbitrary number of states and also go forward again. There is also a button to go right back to the initial steady state.
When you leave the gadget by hitting the "Done" button, this log is cleared.
If you stop the gadget from RStudio by hitting the "Stop" button, then the
log is left behind. You can then restart the gadget by calling
params argument and it will re-instate the states from the log.
The log is stored in the tempdir of your current R session, as given by
tempdir(). For each steady state you calculate the params objects is in a
file named according to the date and time when it was created.
You can customise which functionality is included in the app via the
tabs arguments. You can remove some of the controls and
tabs by providing shorter lists to those arguments. You can also add your
own controls and tabs.
For an entry "foo" in the
controls list there needs to be a function
"fooControlUI" that defines the input elements and a function "fooControl"
that processes those inputs to change the params object. You can model your
own control sections on the existing ones that you find in the file
For any entry "foo" in the
tabs list there needs to be a function
"fooTabUI" that defines the tab layout and a function "fooTab"
that calculates the outputs to be displayed on the tab. You can model your
own tabs on the existing ones that you find in the file
The fishing control currently assumes that each species is selected by only one gear. It allows the user to change the parameters for that gear. It also enforces the same effort for all gears. It sets all efforts to that for the first gear and then allows the user to change that single effort value.