Title: | R implementation of Ecopath with Ecosim |
---|---|
Description: | This package implements the core mass balance equations made popular by Ecopath with Ecosim. There are two parts to the package, the static snapshot of energy flow through the system using rpath and dynamic simulations run using the rsim family of functions. |
Authors: | Kerim Aydin [aut], Sean Lucey [aut, cre], Sarah Gaichas [aut] |
Maintainer: | Sean Lucey <[email protected]> |
License: | file LICENSE |
Version: | 0.9.1 |
Built: | 2025-01-01 04:53:09 UTC |
Source: | https://github.com/NOAA-EDAB/Rpath |
The Rpath package provides two categories of important functions: rpath and rsim.
The rpath functions generate the balanced snap shot of energy flow through the system. This is done by solving a series of linear equations for unknown biomass or ecotrophic efficiency.
Maintainer: Sean Lucey [email protected]
Authors:
Kerim Aydin [email protected]
Sarah Gaichas [email protected]
Useful links:
A tutorial ecosystem for teaching Rpath
AB.params
AB.params
An Rpath balanced model object that contains:
A data.table containing Ecopath unbalanced ecosystem parameters (base parameters and fisheries).
A data.table containing the Ecopath model's diet matrix.
Parameters for multistanza groups.
A data.table containing the data quality (pedigree) for the Ecopath model.
...
Modifies the fishing mortality value for a species by a particular gear. Parameters that can be adjusted using this function are: ForcedEffort, ForcedFRate, or ForcedCatch.
adjust.fishing( Rsim.scenario, parameter, group = NA, sim.year = 1, sim.month = 0, value )
adjust.fishing( Rsim.scenario, parameter, group = NA, sim.year = 1, sim.month = 0, value )
Rsim.scenario |
Scenario object that contains all of the rsim rates and
forcing functions generated by |
parameter |
Parameters to be modified (See Description) |
group |
Name of the group whose parameter is being changed. |
sim.year |
Year of the simulation that should be modified. Can be a range of years. |
sim.month |
Month of the year that should be modified. If set to 0, all months of the year are modified. |
value |
New value for the parameter. |
Returns an Rsim.scenario
object with the new fishing parameter
values.
Other Adjust functions:
adjust.scenario()
Modifies the various forcing parameters of the rsim scenario object.
adjust.forcing( Rsim.scenario, parameter, group, sim.year = 1, sim.month = 0, bymonth = F, value )
adjust.forcing( Rsim.scenario, parameter, group, sim.year = 1, sim.month = 0, bymonth = F, value )
Rsim.scenario |
Object generated by rsim.scenario. |
parameter |
The Rsim.scenario forcing parameter to be modified. |
group |
The model group that the parameter change will affect. |
sim.year |
Year of the simulation that should be modified. Can be a range of years. |
sim.month |
Month of the year that should be modified. If set to 0, all months of the year are modified. |
bymonth |
Boolean value that denotes whether to use sim.year/sim.month combo or just sim.month as a sequential vector starting at 1. |
value |
The new value for the parameter. |
Returns an Rsim.scenario object with the new parameter.
Other Rpath functions:
MTI()
,
check.rpath.params()
,
create.rpath.params()
,
extract.node()
,
frate.table()
,
read.rpath.params()
,
rpath()
,
rpath.groups()
,
rpath.stanzas()
,
stanzaplot()
,
webplot()
,
write.Rpath()
,
write.Rsim()
,
write.rpath.params()
Modifies the various parameters of the rsim.scenario
object. Parameters
that can be adjusted using this function are:
adjust.scenario(Rsim.scenario, parameter, group, groupto = NA, value)
adjust.scenario(Rsim.scenario, parameter, group, groupto = NA, value)
Rsim.scenario |
Scenario object that contains all of the rsim rates and
forcing functions generated by |
parameter |
Parameters to be modified (See Description) |
group |
The model group that the parameter change will affect. Note that a value of 'all' will affect all groups associate with the groupto variable. |
groupto |
The corresponding group who's parameter is affecting the group variable. |
value |
New value for the parameter. |
Returns an Rsim.scenario
object with the new parameter.
Other Adjust functions:
adjust.fishing()
Logical check that the parameter files are filled out correctly, i.e. data is entered where it is expected.
check.rpath.params(Rpath.params)
check.rpath.params(Rpath.params)
Rpath.params |
R object containing the Rpath parameters. This is generated either by the create.rpath.params or read.rpath.params functions. |
Checks Rpath parameter files for consistency. An error message will be produced if one of the logical checks fails. Checks include: (NOTE: This does not ensure data is correct just that it is in the right places).
Other Rpath functions:
MTI()
,
adjust.forcing()
,
create.rpath.params()
,
extract.node()
,
frate.table()
,
read.rpath.params()
,
rpath()
,
rpath.groups()
,
rpath.stanzas()
,
stanzaplot()
,
webplot()
,
write.Rpath()
,
write.Rsim()
,
write.rpath.params()
Creates a shell of the Rpath.params list object which contains the model, diet, multistanza, and pedigree parameters.
create.rpath.params(group, type, stgroup = NA)
create.rpath.params(group, type, stgroup = NA)
group |
Vector of group names. |
type |
Numeric vector of group type. Living = 0, Producer = 1, Detritus = 2, Fleet = 3. |
stgroup |
Vector of multistanza group names. Include NA for non-stanza groups. |
Outputs a list object of Rpath parameters which are populated with values of NA or logical default values. Values can then be filled in using R. Use check.rpath.params() to ensure parameter files are filled out correctly (NOTE: This does not ensure data is correct just that it is in the right places).
Other Rpath functions:
MTI()
,
adjust.forcing()
,
check.rpath.params()
,
extract.node()
,
frate.table()
,
read.rpath.params()
,
rpath()
,
rpath.groups()
,
rpath.stanzas()
,
stanzaplot()
,
webplot()
,
write.Rpath()
,
write.Rsim()
,
write.rpath.params()
Rpath inputs (unbalanaced model).
Ecosense.EBS
Ecosense.EBS
An Rpath unbalanced model object that contains:
A data.table containing Ecopath unbalanced ecosystem parameters (base parameters and fisheries).
A data.table containing the Ecopath model's diet matrix.
Parameters for multistanza groups.
A data.table containing the data quality (pedigree) for the Ecopath model.
...
Whitehouse and Aydin 2020. Assessing the sensitivity of three Alaska marine food webs to perturbations: an example of Ecosim simulations using Rpath. https://doi.org/10.1016/j.ecolmodel.2020.109074
Rpath inputs (unbalanaced model).
Ecosense.ECS
Ecosense.ECS
An Rpath unbalanced model object that contains:
A data.table containing Ecopath unbalanced ecosystem parameters (base parameters and fisheries).
A data.table containing the Ecopath model's diet matrix.
Parameters for multistanza groups.
A data.table containing the data quality (pedigree) for the Ecopath model.
...
Whitehouse and Aydin 2020. Assessing the sensitivity of three Alaska marine food webs to perturbations: an example of Ecosim simulations using Rpath. https://doi.org/10.1016/j.ecolmodel.2020.109074
Rpath inputs (unbalanaced model).
Ecosense.GOA
Ecosense.GOA
An Rpath unbalanced model object that contains:
A data.table containing Ecopath unbalanced ecosystem parameters (base parameters and fisheries).
A data.table containing the Ecopath model's diet matrix.
Parameters for multistanza groups.
A data.table containing the data quality (pedigree) for the Ecopath model.
...
Whitehouse and Aydin 2020. Assessing the sensitivity of three Alaska marine food webs to perturbations: an example of Ecosim simulations using Rpath. https://doi.org/10.1016/j.ecolmodel.2020.109074
Creates a list object with node specific data using Rsim.output object.
extract.node(Rsim.output, group)
extract.node(Rsim.output, group)
Rsim.output |
Object generated by rsim.run. |
group |
Name of the node for which you want to extract data. |
Returns a list object with node specific data.
Other Rpath functions:
MTI()
,
adjust.forcing()
,
check.rpath.params()
,
create.rpath.params()
,
frate.table()
,
read.rpath.params()
,
rpath()
,
rpath.groups()
,
rpath.stanzas()
,
stanzaplot()
,
webplot()
,
write.Rpath()
,
write.Rsim()
,
write.rpath.params()
Creates a table of fishing mortalities by species group and gear for an
Rsim.scenario
object.
frate.table(Rsim.scenario)
frate.table(Rsim.scenario)
Rsim.scenario |
Scenario object that contains all of the rsim rates and
forcing functions generated by |
Returns a data table of F values for each species/gear combination.
Other Rpath functions:
MTI()
,
adjust.forcing()
,
check.rpath.params()
,
create.rpath.params()
,
extract.node()
,
read.rpath.params()
,
rpath()
,
rpath.groups()
,
rpath.stanzas()
,
stanzaplot()
,
webplot()
,
write.Rpath()
,
write.Rsim()
,
write.rpath.params()
Helper function that will retrieve the fishing forcing parameters that were used in an Rsim scenario
get.rsim.fishing(Rsim.scenario)
get.rsim.fishing(Rsim.scenario)
Rsim.scenario |
Scenario object that contains all of the rsim rates and
forcing functions generated by |
Returns an Rsim.fishing
object.
Other Get functions:
get.rsim.forcing()
,
get.rsim.params()
,
get.rsim.stanzas()
,
get.rsim.start_state()
Helper function that will retrieve the forcing parameters that were used in an Rsim scenario
get.rsim.forcing(Rsim.scenario)
get.rsim.forcing(Rsim.scenario)
Rsim.scenario |
Scenario object that contains all of the rsim rates and
forcing functions generated by |
Returns an Rsim.forcing
object.
Other Get functions:
get.rsim.fishing()
,
get.rsim.params()
,
get.rsim.stanzas()
,
get.rsim.start_state()
Helper function that will retrieve parameters that were used in an Rsim scenario
get.rsim.params(Rsim.scenario)
get.rsim.params(Rsim.scenario)
Rsim.scenario |
Scenario object that contains all of the rsim rates and
forcing functions generated by |
Returns an Rsim.params
object.
Other Get functions:
get.rsim.fishing()
,
get.rsim.forcing()
,
get.rsim.stanzas()
,
get.rsim.start_state()
Helper function that will retrieve the stanza parameters that were used in an Rsim scenario
get.rsim.stanzas(Rsim.scenario)
get.rsim.stanzas(Rsim.scenario)
Rsim.scenario |
Scenario object that contains all of the rsim rates and
forcing functions generated by |
Returns an Rsim.stanzas
object.
Other Get functions:
get.rsim.fishing()
,
get.rsim.forcing()
,
get.rsim.params()
,
get.rsim.start_state()
Helper function that will retrieve the starting state values that were used in an Rsim scenario
get.rsim.start_state(Rsim.scenario)
get.rsim.start_state(Rsim.scenario)
Rsim.scenario |
Scenario object that contains all of the rsim rates and
forcing functions generated by |
Returns an Rsim.state
object.
Other Get functions:
get.rsim.fishing()
,
get.rsim.forcing()
,
get.rsim.params()
,
get.rsim.stanzas()
Need to edit.
MTI(Rpath, Rpath.params, increase = T)
MTI(Rpath, Rpath.params, increase = T)
Rpath |
Balanced Rpath model generated by rpath. |
Rpath.params |
R object containing the Rpath parameters. This is generated either by the create.rpath.params or read.rpath.params functions. |
increase |
Logical value indicating whether a marginal increase is applied. |
Returns a matrix of mixed trophic impacts.
Other Rpath functions:
adjust.forcing()
,
check.rpath.params()
,
create.rpath.params()
,
extract.node()
,
frate.table()
,
read.rpath.params()
,
rpath()
,
rpath.groups()
,
rpath.stanzas()
,
stanzaplot()
,
webplot()
,
write.Rpath()
,
write.Rsim()
,
write.rpath.params()
Creates an Rpath.param object from a series of .csv files.
read.rpath.params( modfile, dietfile, pedfile = NA, stanzagroupfile = NA, stanzafile = NA )
read.rpath.params( modfile, dietfile, pedfile = NA, stanzagroupfile = NA, stanzafile = NA )
modfile |
file location of the flat file containing the model parameters. |
dietfile |
file location of the flat file containing the diet parameters. |
pedfile |
file location of the flat file containg the pedgigree parameters. |
stanzagroupfile |
file location of the flat file containing the group parameters for multistanza groups. If not specified a blank stanza list will be created. |
stanzafile |
file location of the flat file containing the individual stanza parameters for multistanza groups. If not specified a blank stanza list will be created. |
Outputs an Rpath.param object that can be used for Rpath and subsequently Rsim. (NOTE: This does function does not ensure data is correct or in the correct locations...run check.rpath.param to ensure the appropriate columns are present).
Other Rpath functions:
MTI()
,
adjust.forcing()
,
check.rpath.params()
,
create.rpath.params()
,
extract.node()
,
frate.table()
,
rpath()
,
rpath.groups()
,
rpath.stanzas()
,
stanzaplot()
,
webplot()
,
write.Rpath()
,
write.Rsim()
,
write.rpath.params()
A sample ecosystem for Rpath - Anchovy Bay.
REco.params
REco.params
An Rpath balanced model object that contains:
A data.table containing Ecopath unbalanced ecosystem parameters (base parameters and fisheries).
A data.table containing the Ecopath model's diet matrix.
Parameters for multistanza groups.
A data.table containing the data quality (pedigree) for the Ecopath model.
...
Performs initial mass balance using a model parameter file and diet matrix file.
rpath(Rpath.params, eco.name = NA, eco.area = 1)
rpath(Rpath.params, eco.name = NA, eco.area = 1)
Rpath.params |
R object containing the Rpath parameters. This is generated either by the create.rpath.params or read.rpath.params functions. |
eco.name |
Optional name of the ecosystem which becomes an attribute of rpath object. |
eco.area |
Optional area of the ecosystem which becomes an attribute of the rpath object. |
Returns an Rpath object that can be supplied to the rsim.scenario function.
Other Rpath functions:
MTI()
,
adjust.forcing()
,
check.rpath.params()
,
create.rpath.params()
,
extract.node()
,
frate.table()
,
read.rpath.params()
,
rpath.groups()
,
rpath.stanzas()
,
stanzaplot()
,
webplot()
,
write.Rpath()
,
write.Rsim()
,
write.rpath.params()
Get a character vector of functional group names from an Rpath object (balanced model) or an Rpath.params object (unbalanced model parameters) based on the 'type' input parameter as follows: (0: consumers, 1: producers, 2: detrital, 3: gears, 0<type<1: mixotrophs). Living groups are consumers + producers. Note that mixotrophs are not returned as either consumers or producers, only separately.
rpath.groups(Rpath) rpath.living(Rpath) rpath.detrital(Rpath) rpath.gears(Rpath) rpath.producers(Rpath) rpath.consumers(Rpath) rpath.mixotrophs(Rpath)
rpath.groups(Rpath) rpath.living(Rpath) rpath.detrital(Rpath) rpath.gears(Rpath) rpath.producers(Rpath) rpath.consumers(Rpath) rpath.mixotrophs(Rpath)
Rpath |
Balanced Rpath model generated by rpath. |
Returns a character vector containing the names of Rpath functional groups by category (group type).
Other Rpath functions:
MTI()
,
adjust.forcing()
,
check.rpath.params()
,
create.rpath.params()
,
extract.node()
,
frate.table()
,
read.rpath.params()
,
rpath()
,
rpath.stanzas()
,
stanzaplot()
,
webplot()
,
write.Rpath()
,
write.Rsim()
,
write.rpath.params()
Uses the leading stanza to calculate the biomass and consumption of other stanzas necessary to support the leading stanza.
rpath.stanzas(Rpath.params)
rpath.stanzas(Rpath.params)
Rpath.params |
R object containing the Rpath parameters. This is generated either by the create.rpath.params or read.rpath.params functions. |
Calculates and adds biomass and consumption for trailing stanza groups. Also adds weight at age and number at age for multi-staza groups.
Other Rpath functions:
MTI()
,
adjust.forcing()
,
check.rpath.params()
,
create.rpath.params()
,
extract.node()
,
frate.table()
,
read.rpath.params()
,
rpath()
,
rpath.groups()
,
stanzaplot()
,
webplot()
,
write.Rpath()
,
write.Rsim()
,
write.rpath.params()
Calculates the derivative for a single time step and saves the output
rsim.deriv(Rsim.scenario, sim.year = 0, sim.month = 0, tstep = 0)
rsim.deriv(Rsim.scenario, sim.year = 0, sim.month = 0, tstep = 0)
Rsim.scenario |
Scenario object that contains all of the rsim rates and
forcing functions generated by |
sim.year |
Will inherit from apply functions |
sim.month |
Will inherit from apply functions |
tstep |
Sub-monthly time step usually set to 0. |
Creates a matrix of consumption of prey by a particular predator.
rsim.diet(Rsim.output, group)
rsim.diet(Rsim.output, group)
Rsim.output |
R object containing the output from |
group |
Group from the |
Creates a matrix for forcing functions related to fishing (ForcedEffort, ForcedFRate, ForcedCatch)
rsim.fishing(params, years)
rsim.fishing(params, years)
params |
Rsim parameter object generated by |
years |
A vector of each year of the simulation. |
Creates a matrix for forcing functions not related to fishing (ForcedPrey ForcedMort, ForcedRecs, ForcedSearch, ForcedMigrate, ForcedBio).
rsim.forcing(params, years)
rsim.forcing(params, years)
params |
Rsim parameter object generated by |
years |
A vector of each year of the simulation. |
Creates a matrix of mortality by predators on a particular prey.
rsim.mort(Rsim.output, group)
rsim.mort(Rsim.output, group)
Rsim.output |
R object containing the output from |
group |
Group from the |
Converts the outputs from Rpath into rates for use in Rsim.
rsim.params( Rpath, mscramble = 2, mhandle = 1000, preyswitch = 1, scrambleselfwt = 0, handleselfwt = 0, steps_yr = 12, steps_m = 1 )
rsim.params( Rpath, mscramble = 2, mhandle = 1000, preyswitch = 1, scrambleselfwt = 0, handleselfwt = 0, steps_yr = 12, steps_m = 1 )
Rpath |
R object containing a balanced |
mscramble |
WILL REMOVE |
mhandle |
WILL REMOVE |
preyswitch |
WILL REMOVE - Adjust with adjust.scenario |
scrambleselfwt |
Value of 1 indicates no overlap while 0 indicates complete overlap. |
handleselfwt |
Value of 1 indicates no overlap while 0 indicates complete overlap. |
steps_yr |
Number of time steps per year. |
steps_m |
Number of time steps per month. |
Returns an Rsim.params
object that is passed to the rsim.run
function via the rsim.scenario
function.
Other Rsim functions:
rsim.plot()
,
rsim.run()
,
rsim.scenario()
,
rsim.step()
Plots the relative biomass of each group from an Rsim.output
object.
rsim.plot(Rsim.output, spname = "all", indplot = F)
rsim.plot(Rsim.output, spname = "all", indplot = F)
Rsim.output |
R object containing the output from |
spname |
Vector of species names to be displayed. The default "all" will display all group names. |
indplot |
Logical value of whether to plot a single group or multiple groups |
Creates a figure of relative biomass.
Other Rsim functions:
rsim.params()
,
rsim.run()
,
rsim.scenario()
,
rsim.step()
Carries out the numerical integration of the Rsim alogrithms.
rsim.run(Rsim.scenario, method = "RK4", years = 1:100)
rsim.run(Rsim.scenario, method = "RK4", years = 1:100)
Rsim.scenario |
Scenario object that contains all of the rsim rates and
forcing functions generated by |
method |
Numerical integration method. Either 'AB' for Adams-Bashforth or 'RK4' for 4th order Runge-Kutta. |
years |
A vector of each year of the simulation. |
Other Rsim functions:
rsim.params()
,
rsim.plot()
,
rsim.scenario()
,
rsim.step()
Rpath
Uses a balanced Rpath
model and creates a scenario consisting of 5 list objects:
params
, start_state
, forcing
, fishing
, and
stanzas
.
rsim.scenario(Rpath, Rpath.params, years = 1:100)
rsim.scenario(Rpath, Rpath.params, years = 1:100)
Rpath |
R object containing a balanced |
Rpath.params |
R object containing the Rpath parameters. This is generated either by the create.rpath.params or read.rpath.params functions. |
years |
A vector of each year of the simulation. |
Returns an Rsim.scenario
object that can be supplied to the
rsim.run
function.
Other Rsim functions:
rsim.params()
,
rsim.plot()
,
rsim.run()
,
rsim.step()
Kerim Aydin 31 December 2019
rsim.sense(Rsim.scenario, Rpath.params, Vvary = c(0, 0), Dvary = c(0, 0))
rsim.sense(Rsim.scenario, Rpath.params, Vvary = c(0, 0), Dvary = c(0, 0))
Rsim.scenario |
Rsim scenario object used as center of distributions (base model) during random parameter generation. |
Rpath.params |
Rpath parameter object (unbalanced model) used for data pedigree input. |
Vvary |
length-2 vector with (lower,upper) bounds of vulnerability generation in log-space - 1, Vvary = log(X-1) so Walters et al. 1997 range of (1..inf) centered on 2 becomes (-inf,+inf) centered on 0. |
Dvary |
length-2 vector with (lower,upper) bounds of handling time generation in log-space - 1, scaled as Vvary, above. |
Returns an Rsim.params object that can be substituted for the params in an Rsim.scenario object.
5 November 2019
rsim.sense.path(Rsim.scenario, Rpath, Rpath.params, steps_yr = 12, steps_m = 1)
rsim.sense.path(Rsim.scenario, Rpath, Rpath.params, steps_yr = 12, steps_m = 1)
Returns an Rsim.scenario object that can be supplied to the rsim.run function.
Creates a matrix of stanza variables to be used by rsim.run
.
rsim.stanzas(Rpath.params, state, params)
rsim.stanzas(Rpath.params, state, params)
Rpath.params |
R object containing the Rpath parameters. This is generated either by the create.rpath.params or read.rpath.params functions. |
state |
List object of state variables generated by |
params |
Rsim parameter object generated by |
Creates a matrix of state variables used by Rsim.
rsim.state(params)
rsim.state(params)
params |
Rsim parameter object generated by |
Runs rsim.run
and appends the output to a previous Rsim.output
.
Currently only works with the Adams-Bashforth numerical integration method (AB).
rsim.step(Rsim.scenario, Rsim.output, method = "AB", year.end)
rsim.step(Rsim.scenario, Rsim.output, method = "AB", year.end)
Rsim.scenario |
Scenario object that contains all of the rsim rates and
forcing functions generated by |
Rsim.output |
R object containing the output from |
method |
Numerical integration method. Either 'AB' for Adams-Bashforth or 'RK4' for 4th order Runge-Kutta. |
year.end |
The final year for the step interval |
Returns an Rsim.output
object.
Other Rsim functions:
rsim.params()
,
rsim.plot()
,
rsim.run()
,
rsim.scenario()
Modifies the various parameters of the rsim.scenario
object. Parameters
that can be adjusted using this function are:
set.rsim.scene( Rsim.scenario, params = NULL, start_state = NULL, forcing = NULL, fishing = NULL, stanzas = NULL )
set.rsim.scene( Rsim.scenario, params = NULL, start_state = NULL, forcing = NULL, fishing = NULL, stanzas = NULL )
Rsim.scenario |
Scenario object that contains all of the rsim rates and
forcing functions generated by |
params |
Rsim parameter object generated by |
start_state |
Rsim starting values object generated by |
forcing |
Rsim forcing matrix object generated by |
fishing |
Rsim fishing matrix object generated by |
stanzas |
Rsim stanza parameters object generated by |
Returns an Rsim.scenario
object with the new parameter.
Plots the biomass composition of multistanza groups from an Rpath.stanzas object.
stanzaplot( Rpath.params, StanzaGroup, line.cols = c("black", "green", "blue", "red") )
stanzaplot( Rpath.params, StanzaGroup, line.cols = c("black", "green", "blue", "red") )
Rpath.params |
R object containing the Rpath parameters. This is generated either by the create.rpath.params or read.rpath.params functions. |
StanzaGroup |
The Stanza group's name to be plotted. |
line.cols |
A vector of four colors used to represent the population biomass, relative number, indvidual weights, and stanza separation lines. |
Creates a figure showing the break down of biomass and number per stanza.
Other Rpath functions:
MTI()
,
adjust.forcing()
,
check.rpath.params()
,
create.rpath.params()
,
extract.node()
,
frate.table()
,
read.rpath.params()
,
rpath()
,
rpath.groups()
,
rpath.stanzas()
,
webplot()
,
write.Rpath()
,
write.Rsim()
,
write.rpath.params()
Plots the food web associated with an Rpath object.
webplot( Rpath.obj, eco.name = attr(Rpath.obj, "eco.name"), line.col = "grey", highlight = NULL, highlight.col = c("black", "red", "orange"), labels = FALSE, label.pos = NULL, label.num = FALSE, label.cex = 1, fleets = FALSE, type.col = "black", box.order = NULL )
webplot( Rpath.obj, eco.name = attr(Rpath.obj, "eco.name"), line.col = "grey", highlight = NULL, highlight.col = c("black", "red", "orange"), labels = FALSE, label.pos = NULL, label.num = FALSE, label.cex = 1, fleets = FALSE, type.col = "black", box.order = NULL )
Rpath.obj |
Rpath model created by the ecopath() function. |
eco.name |
Optional name of the ecosystem. Default is the eco.name attribute from the rpath object. |
line.col |
The color of the lines between nodes of the food web. |
highlight |
Set to the group number or name to highlight the connections of that group. |
highlight.col |
Color of the connections to the highlighted group. |
labels |
Logical whether or not to display group names. If True and label.pos is Null, no points will be ploted, just label names. |
label.pos |
A position specifier for the labels. Values of 1, 2, 3, 4, respectively indicate positions below, to the left of, above, and to the right of the points. A null value will cause the labels to be ploted without the points (Assuming that labels = TRUE). |
label.num |
Logical value indication whether group numbers should be used for labels instead of names. |
label.cex |
The relative size of the labels within the plot. |
fleets |
Logical value indicating whether or not to include fishing fleets in the food web. |
type.col |
The color of the points cooresponding to the types of the group. Can either be of length 1 or 4. Color order will be living, primary producers, detrital, and fleet groups. |
box.order |
Vector of box numbers to change the default plot order. Must include all box numbers |
Creates a figure of the food web.
Other Rpath functions:
MTI()
,
adjust.forcing()
,
check.rpath.params()
,
create.rpath.params()
,
extract.node()
,
frate.table()
,
read.rpath.params()
,
rpath()
,
rpath.groups()
,
rpath.stanzas()
,
stanzaplot()
,
write.Rpath()
,
write.Rsim()
,
write.rpath.params()
Outputs basic parameters or mortalities to a .csv file.
write.Rpath(x, file = NA, morts = F)
write.Rpath(x, file = NA, morts = F)
x |
Rpath model created by the ecopath() function. |
file |
file name for resultant file. Need to specify ".csv" or ".RData". |
morts |
Logical value whether to output basic parameters or mortalities. |
Writes a .csv file with the basic parameters or mortalities from an Rpath object.
Other Rpath functions:
MTI()
,
adjust.forcing()
,
check.rpath.params()
,
create.rpath.params()
,
extract.node()
,
frate.table()
,
read.rpath.params()
,
rpath()
,
rpath.groups()
,
rpath.stanzas()
,
stanzaplot()
,
webplot()
,
write.Rsim()
,
write.rpath.params()
Creates a series of .csv files from an Rpath.params object.
write.rpath.params(Rpath.params, eco.name, path = "")
write.rpath.params(Rpath.params, eco.name, path = "")
Rpath.params |
R object containing the Rpath parameters. Most likely this was created using create.rpath.params or read.rpath.params. |
eco.name |
ecosystem name that will be included in all the file names. |
path |
location for the output files. |
Outputs a series of .csv files named by the provided eco.name and the parameters they represent. For example the model parameters will be named "eco.name_model.csv".
Other Rpath functions:
MTI()
,
adjust.forcing()
,
check.rpath.params()
,
create.rpath.params()
,
extract.node()
,
frate.table()
,
read.rpath.params()
,
rpath()
,
rpath.groups()
,
rpath.stanzas()
,
stanzaplot()
,
webplot()
,
write.Rpath()
,
write.Rsim()
Outputs start/end biomass and catch to a .csv file.
write.Rsim(Rsim.output, file = NA)
write.Rsim(Rsim.output, file = NA)
Rsim.output |
object created by the rsim.run() function. |
file |
file name for resultant .csv file. Be sure to include ".csv". |
Writes a .csv file with the start and end biomass and catch per group from an Rpath.sim object.
Other Rpath functions:
MTI()
,
adjust.forcing()
,
check.rpath.params()
,
create.rpath.params()
,
extract.node()
,
frate.table()
,
read.rpath.params()
,
rpath()
,
rpath.groups()
,
rpath.stanzas()
,
stanzaplot()
,
webplot()
,
write.Rpath()
,
write.rpath.params()