gadget_likelihood_component | R Documentation |
Structures representing a component of a GADGET likelihood file.
gadget_likelihood_component(type, weight = 0, name = type, likelihoodfile = 'likelihood', ...)
type |
Type of group to create. One of penalty, understocking, catchstatistics, catchdistribution, stockdistribution. |
name |
A descriptive name for the component |
weight |
A numeric weighting |
likelihoodfile |
The likelihood file this component should end up in |
... |
Extra parameters for the group. See details. |
In addition, penalty
understands:
A data.frame
with 2 columns, "switch" and "power"
catchstatistics
understands:
The function Gadget should use, by default guesses based on the function that generated data
A data.frame
probably generated by mfdb_sample_meanlength_stddev
An list
of areas, taken from attr(data, "area")
if not supplied
An list
of ages, taken from attr(data, "age")
if not supplied
List of fleet names
List of stock names
catchdistribution
understands:
The function Gadget should use, by default uses sumofsquares
Extra parameters to supply to gadget, based on the function
TRUE or FALSE, defaults to FALSE
TRUE or FALSE, defaults to FALSE
Numeric, defaults to 10
A data.frame
probably generated by mfdb_sample_meanlength_stddev
An list
of areas, taken from attr(data, "area")
if not supplied
An list
of ages, taken from attr(data, "age")
if not supplied
An list
of lengths, taken from attr(data, "length")
if not supplied
List of fleet names
List of stock names
stockdistribution
understands:
The function Gadget should use, by default uses sumofsquares
TRUE or FALSE, defaults to FALSE
Numeric, defaults to 10
A data.frame
probably generated by mfdb_sample_meanlength_stddev
An list
of areas, taken from attr(data, "area")
if not supplied
An list
of ages, taken from attr(data, "age")
if not supplied
An list
of lengths, taken from attr(data, "length")
if not supplied
List of fleet names
List of stock names
surveydistribution
understands:
A data.frame
probably generated by mfdb_sample_meanlength_stddev
An list
of areas, taken from attr(data, "area")
if not supplied
An list
of lengths, taken from attr(data, "length")
if not supplied
An list
of ages, taken from attr(data, "age")
if not supplied
List of stock names
Fit options, see GADGET manual
A vector of length 2
A single suitability function
Numeric, defaults to 10
String, see GADGET manual
surveyindices
understands:
What data the component is based on, see GADGET manual
0 or 1, defaults to 0
A data.frame
probably generated by mfdb_sample_meanlength_stddev
An list
of areas, taken from attr(data, "area")
if not supplied
An list
of ages, taken from attr(data, "age")
if not supplied
An list
of lengths, taken from attr(data, "length")
if not supplied
List of fleet names
List of stock names
List of acoustic survey names
Fit options, see GADGET manual
stomachcontent
understands:
Function GADGET will use
To be used when calculated probability is low
Either a vector of stock names to be used for all preys, or a list to match preys, see below
Optional. Either a vector of coefficients fo be used for all preys, or a list to match preys, see below
Vector of predator stock names
A data.frame
probably generated by mfdb_sample_meanlength_stddev
Both prey_labels
and prey_digestion_coefficients
allow you to
match parts of prey labels and use repetition. For instance,
list("cod.mat" = "mature_cod", "cod" = "cod", "other")
will give
"cod.mat" the label "mature_cod", "cod.imm" the label "cod", and anything
else will get "other". You can also use regular expression syntax, for example
"cod[0-9]".
migrationpenalty
understands:
Stock name
2 power coefficients
A gadget_likelihood_component object that can then be written to a likelihood
file with gadget_dir_write
# Create a penalty component component <- gadget_likelihood_component("penalty", name = "bounds", weight = "0.5", data = data.frame( switch = c("default"), power = c(2), stringsAsFactors = FALSE)) component # Create an understocking component component <- gadget_likelihood_component("understocking", name ="understock") component # Any example could be added to a file with the following:- gd <- gadget_directory(tempfile()) gadget_dir_write(gd, component)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.