Title: | The Fisheries Integrated Modeling System |
---|---|
Description: | The Fisheries Integrated Modeling System is a next-generation framework of stock assessment models, assisting fishery managers with the goal of achieving sustainable fisheries. This system, when completed in a few years, offers the NOAA Fisheries and global fisheries science communities an advanced set of stock assessment models. These tools can be used separately or in combination to incorporate ecosystem and socioeconomic data and models, as well as climate effects and other drivers within the marine environment, into stock assessment models. |
Authors: | Kelli F. Johnson [aut, cre] , Jon K. T. Brodziak [aut] , Kathryn L. Doering [aut] , Andrea M. Havron [aut] , Ronald Klasky [aut] , Peter T. Kuriyama [aut] , Christopher M. Legault [aut] , Bai Li [aut] , Timothy J. Miller [aut] , Cole C. Monnahan [aut] , Megumi C. Oshima [aut] , Kyle W. Shertzer [aut] , Christine C. Stawitz [aut] , Jane Y. Sullivan [aut] , Matthew Supernaw [aut] , Ian G. Taylor [aut] , Nathan R. Vaughan [aut] , Kristan Blackhart [ctb] , James N. Ianelli [ctb] |
Maintainer: | Kelli F. Johnson <[email protected]> |
License: | GPL (>= 3) | file LICENSE |
Version: | 0.3.0.1 |
Built: | 2025-01-17 15:26:20 UTC |
Source: | https://github.com/noaa-fims/fims |
Rcpp_ParameterVector
In R, indexing starts at one. But, in C++ indexing starts at zero. These functions do the translation for you so you can think in R terms.
In R, indexing starts at one. But, in C++ indexing starts at zero. This function does the translation for you so you can think in R terms.
Methods of summary functions include max
, min
, range
, prod
, sum
,
any
, and all
.
## S4 replacement method for signature 'Rcpp_ParameterVector,ANY,ANY,ANY' x[i, j] <- value ## S4 method for signature 'Rcpp_ParameterVector,numeric,ANY,ANY' x[i] ## S4 method for signature 'Rcpp_ParameterVector' length(x) ## S4 method for signature 'Rcpp_ParameterVector' sum(x) ## S4 method for signature 'Rcpp_ParameterVector' dim(x) ## S4 method for signature 'Rcpp_ParameterVector' Summary(x)
## S4 replacement method for signature 'Rcpp_ParameterVector,ANY,ANY,ANY' x[i, j] <- value ## S4 method for signature 'Rcpp_ParameterVector,numeric,ANY,ANY' x[i] ## S4 method for signature 'Rcpp_ParameterVector' length(x) ## S4 method for signature 'Rcpp_ParameterVector' sum(x) ## S4 method for signature 'Rcpp_ParameterVector' dim(x) ## S4 method for signature 'Rcpp_ParameterVector' Summary(x)
x |
An Rcpp_ParameterVector class object. |
i |
An integer specifying the location in R speak, where indexing starts at one, of the vector that you wish to get information from. |
j |
Not used with |
value |
The value you want to set the indexed location to. |
For [<-
, the index i
of object x
is set to value
.
For [
, the index i
of object x
is returned.
For length()
, the length of object x
is returned as an integer.
For sum()
, the sum of object x
is returned as a numeric value.
For dim()
, the dimensions of object x
is returned as a single integer
because there is only one dimension to return for a vector.
Summary
returns a single or two numeric or logical values.
This function generates default parameter settings for a Fisheries Integrated Modeling System (FIMS) model, including recruitment, growth, maturity, population, and fleet configurations. It applies default configurations when specific module settings are not provided by the user.
This function updates the input parameters of a Fisheries Integrated Modeling System (FIMS) model. It allows users to modify specific parameters by providing new values, while retaining the existing modules information from the current input.
create_default_parameters( data, fleets, recruitment = list(form = "BevertonHoltRecruitment", process_distribution = c(log_devs = "DnormDistribution")), growth = list(form = "EWAAgrowth"), maturity = list(form = "LogisticMaturity") ) update_parameters(current_parameters, modified_parameters)
create_default_parameters( data, fleets, recruitment = list(form = "BevertonHoltRecruitment", process_distribution = c(log_devs = "DnormDistribution")), growth = list(form = "EWAAgrowth"), maturity = list(form = "LogisticMaturity") ) update_parameters(current_parameters, modified_parameters)
data |
An S4 object. FIMS input data. |
fleets |
A named list of settings for the fleet module. Each element of
the list should specify a fleet's selectivity form and settings for the
data distribution. If this argument is missing, default values will be
applied for each fleet that is not specified but present in |
recruitment |
A list specifying the settings for the recruitment module. The default is a Beverton–Holt recruitment relationship with log-normal recruitment deviations. |
growth |
A list specifying the settings for the growth module. The
default is |
maturity |
A list specifying the settings for the maturity module. The
default is |
current_parameters |
A list containing the current input parameters, including:
|
modified_parameters |
A named list representing new parameter values to update. |
A list containing the following two entries:
parameters
:A list of parameter inputs for the FIMS model.
modules
:A list of modules with default or user-provided settings.
A list containing:
A list of updated parameter inputs that includes any modifications made by the user.
The unchanged list of module names from the current input.
## Not run: data("data1") fims_frame <- FIMSFrame(data1) fleet1 <- survey1 <- list( selectivity = list(form = "LogisticSelectivity"), data_distribution = c( Index = "DlnormDistribution", AgeComp = "DmultinomDistribution" ) ) fleet2 <- list( selectivity = list(form = "DoubleLogisticSelectivity"), data_distribution = c( Index = "DlnormDistribution", AgeComp = "DmultinomDistribution", LengthComp = "DmultinomDistribution" ) ) default_parameters <- fims_frame |> create_default_parameters( fleets = list(fleet1 = fleet1, fleet2 = fleet2, survey1 = survey1), recruitment = list( form = "BevertonHoltRecruitment", process_distribution = c(log_devs = "DnormDistribution") ), growth = list(form = "EWAAgrowth"), maturity = list(form = "LogisticMaturity") ) ## End(Not run)
## Not run: data("data1") fims_frame <- FIMSFrame(data1) fleet1 <- survey1 <- list( selectivity = list(form = "LogisticSelectivity"), data_distribution = c( Index = "DlnormDistribution", AgeComp = "DmultinomDistribution" ) ) fleet2 <- list( selectivity = list(form = "DoubleLogisticSelectivity"), data_distribution = c( Index = "DlnormDistribution", AgeComp = "DmultinomDistribution", LengthComp = "DmultinomDistribution" ) ) default_parameters <- fims_frame |> create_default_parameters( fleets = list(fleet1 = fleet1, fleet2 = fleet2, survey1 = survey1), recruitment = list( form = "BevertonHoltRecruitment", process_distribution = c(log_devs = "DnormDistribution") ), growth = list(form = "EWAAgrowth"), maturity = list(form = "LogisticMaturity") ) ## End(Not run)
A dataset containing information necessary to run an age-structured stock
assessment model in FIMS. This data was generated using
the ASSAMC
package written for the model comparison project.
data1
data1
A data frame with 19080 observations of 9 variables:
The type of data the row contains. Allowed types
include age
, length
, index
, landings
, age-to-length-conversion
,
and weight-at-age
data.
A character string providing the name of the information source
that the data was collected from, e.g., "Trawl fishery"
.
An integer age. Entry can be NA
if information pertains to
multiple ages, e.g., total catch rather than catch of age-4 fish.
A numeric length. Entry can be NA
if information doesn't
pertain to length.
Start and end dates of the data collection period.
Format all dates using yyyy-mm-dd
, which can accommodate fake years
such as 0001-01-01
.
The measurement of interest.
A character string specifying the units of value
. Allowed
units for each data type are as follows. mt
is used for index
,
landings
, and weight-at-age
data. number
or proportion
are each
viable units for the composition data, where the former is the preferred
unit of measurement.
A real value providing a measurement of uncertainty for value. For catches and survey indices of abundance this should be the standard deviation of the logged observations if you are using the lognormal distribution to fit your data. For composition data it will be your input sample size.
www.github.com/Bai-Li-NOAA/Age_Structured_Stock_Assessment_Model_Comparison
FIMSFit
and associated child classesCreate an object with the class of FIMSFit
after running a FIMS model. This
is typically done within fit_fims()
but it can be create manually by the
user if they have used their own bespoke code to fit a FIMS model.
FIMSFit( input, obj, opt = list(), sdreport = list(), timing = c(time_total = as.difftime(0, units = "secs")), version = utils::packageVersion("FIMS") )
FIMSFit( input, obj, opt = list(), sdreport = list(), timing = c(time_total = as.difftime(0, units = "secs")), version = utils::packageVersion("FIMS") )
input |
Input list as returned by |
obj |
An object returned from |
opt |
An object returned from an optimizer, typically from
|
sdreport |
An object of the |
timing |
A vector of at least length one, where all entries are of the
|
version |
The version of FIMS that was used to optimize the model. If
|
An object with an S4 class of FIMSFit
is returned. The object will have the
following slots:
input
:A list containing the model setup in the same form it was passed.
obj
:A list returned from TMB::MakeADFun()
in the same form it was passed.
opt
:A list containing the optimized model in the same form it was passed.
max_gradient
:The maximum gradient found when optimizing the model. The default is
NA
, which means that the model was not optimized.
report
:A list containing the model report from obj[["report"]]()
.
sdreport
:A object with the sdreport
class containing the output from
TMB::sdreport(obj)
.
estimates
:A table of parameter values and their uncertainty.
timing
:The length of time it took to run the model if it was optimized.
version
:The package version of FIMS used to fit the model or at least the version used to create this output, which will not always be the same if you are running this function yourself.
FIMSFrame
and associated child classesAll constructor functions take a single input and build an object specific
to the needs of each model type within FIMS. FIMSFrame
is the parent
class. Future, associated child classes will have the additional slots
needed for different types of models.
FIMSFrame(data)
FIMSFrame(data)
data |
A |
The input data are both sorted and expanded before returning them in the data slot.
It is important that the order of the rows in the data are correct but it is
not expected that the user will do this. Instead, the returned data are
sorted using dplyr::arrange()
before placing them in the data slot. Data
are first sorted by data type, placing all weight-at-age data next to other
weight-at-age data and all landings data next to landings data. Thus,
age-composition data will come first because their type is "age" and "a" is
first in the alphabet. All other types will follow according to their order
in the alphabet.
Next, within each type, data are organized by fleet. So, age-composition
information for fleet1 will come before survey1. Next, all data within type
and fleet are arranged by datestart, e.g., by year. That is the end of the
sorting for time series data like landings and indices.
The biological data are further sorted by bin. Thus, age-composition
information will be arranged as follows:
type | name | datestart | age | value |
age | fleet1 | 2022-01-01 | 1 | 0.3 |
age | fleet1 | 2022-01-01 | 2 | 0.7 |
age | fleet1 | 2023-01-01 | 1 | 0.5 |
Length composition-data are sorted the same way but by length bin instead of by age bin. It becomes more complicated for the age-to-length-conversion data, which are sorted by type, name, datestart, age, and then length. So, a full set of length, e.g., length 10, length 20, length 30, etc., is placed together for a given age. After that age, another entire set of length information will be provided for that next age. Once the year is complete for a given fleet then the next year will begin.
An object of the S4 class FIMSFrame
class, or one of its child classes, is
validated and then returned. All objects will at a minimum have a slot
called data
to store the input data frame. Additional slots are dependent
on the child class. Use methods::showClass()
to see all available slots.
Fit a FIMS model (BETA)
fit_fims( input, get_sd = TRUE, save_sd = TRUE, number_of_loops = 3, optimize = TRUE, number_of_newton_steps = 0, control = list(eval.max = 10000, iter.max = 10000, trace = 0), filename = NULL )
fit_fims( input, get_sd = TRUE, save_sd = TRUE, number_of_loops = 3, optimize = TRUE, number_of_newton_steps = 0, control = list(eval.max = 10000, iter.max = 10000, trace = 0), filename = NULL )
input |
Input list as returned by |
get_sd |
A boolean specifying if the |
save_sd |
A logical, with the default |
number_of_loops |
A positive integer specifying the number of iterations of the optimizer that will be performed to improve the gradient. The default is three, leading to four total optimization steps. |
optimize |
Optimize (TRUE, default) or (FALSE) build and return a list containing the obj and report slot. |
number_of_newton_steps |
The number of Newton steps using the inverse Hessian to do after optimization. Not yet implemented. |
control |
A list of optimizer settings passed to |
filename |
Character string giving a file name to save the fitted
object as an RDS object. Defaults to 'fit.RDS', and a value of NULL
indicates not to save it. If specified, it must end in .RDS. The file is
written to folder given by |
This function is a beta version still and subject to change without warning.
An object of class FIMSFit
is returned, where the structure is the same
regardless if optimize = TRUE
or not. Uncertainty information is only
included in the estimates
slot if get_sd = TRUE
.
There is an accessor function for each slot in the S4 class FIMSFit
, where
the function is named get_*()
and the star can be replaced with the slot
name, e.g., get_input()
. These accessor functions are the preferred way
to access objects stored in the available slots.
get_input(x) ## S4 method for signature 'FIMSFit' get_input(x) get_report(x) ## S4 method for signature 'FIMSFit' get_report(x) get_obj(x) ## S4 method for signature 'FIMSFit' get_obj(x) get_opt(x) ## S4 method for signature 'FIMSFit' get_opt(x) get_max_gradient(x) ## S4 method for signature 'FIMSFit' get_max_gradient(x) get_sdreport(x) ## S4 method for signature 'FIMSFit' get_sdreport(x) get_estimates(x) ## S4 method for signature 'FIMSFit' get_estimates(x) get_number_of_parameters(x) ## S4 method for signature 'FIMSFit' get_number_of_parameters(x) get_timing(x) ## S4 method for signature 'FIMSFit' get_timing(x) get_version(x) ## S4 method for signature 'FIMSFit' get_version(x)
get_input(x) ## S4 method for signature 'FIMSFit' get_input(x) get_report(x) ## S4 method for signature 'FIMSFit' get_report(x) get_obj(x) ## S4 method for signature 'FIMSFit' get_obj(x) get_opt(x) ## S4 method for signature 'FIMSFit' get_opt(x) get_max_gradient(x) ## S4 method for signature 'FIMSFit' get_max_gradient(x) get_sdreport(x) ## S4 method for signature 'FIMSFit' get_sdreport(x) get_estimates(x) ## S4 method for signature 'FIMSFit' get_estimates(x) get_number_of_parameters(x) ## S4 method for signature 'FIMSFit' get_number_of_parameters(x) get_timing(x) ## S4 method for signature 'FIMSFit' get_timing(x) get_version(x) ## S4 method for signature 'FIMSFit' get_version(x)
x |
Output returned from |
get_input()
returns the list that was used to fit the FIMS model, which
is the returned object from create_default_parameters()
.
get_report()
returns the TMB report, where anything that is flagged as
reportable in the C++ code is returned.
get_obj()
returns the output from TMB::MakeADFun()
.
get_opt()
returns the output from nlminb()
, which is the minimizer used
in fit_fims()
.
get_max_gradient()
returns the maximum gradient found when optimizing the
model.
get_sdreport()
returns the list from TMB::sdreport()
.
get_estimates()
returns a tibble of parameter values and their
uncertainties from a fitted model.
get_number_of_parameters()
returns a vector of integers specifying the
number of fixed-effect parameters and the number of random-effect parameters
in the model.
get_timing()
returns the amount of time it took to run the model in
seconds as a difftime
object.
get_version()
returns the package_version
of FIMS that was used to fit
the model.
There is an accessor function for each slot in the S4 class FIMSFrame
,
where the function is named get_*()
and the star can be replaced with the
slot name, e.g., get_data()
. These accessor functions are the preferred
way to access objects stored in the available slots.
get_data(x) ## S4 method for signature 'FIMSFrame' get_data(x) ## S4 method for signature 'data.frame' get_data(x) get_fleets(x) ## S4 method for signature 'FIMSFrame' get_fleets(x) ## S4 method for signature 'data.frame' get_fleets(x) get_n_years(x) ## S4 method for signature 'FIMSFrame' get_n_years(x) ## S4 method for signature 'data.frame' get_n_years(x) get_start_year(x) ## S4 method for signature 'FIMSFrame' get_start_year(x) ## S4 method for signature 'data.frame' get_start_year(x) get_end_year(x) ## S4 method for signature 'FIMSFrame' get_end_year(x) ## S4 method for signature 'data.frame' get_end_year(x) get_ages(x) ## S4 method for signature 'FIMSFrame' get_ages(x) ## S4 method for signature 'data.frame' get_ages(x) get_n_ages(x) ## S4 method for signature 'FIMSFrame' get_n_ages(x) ## S4 method for signature 'data.frame' get_n_ages(x) get_lengths(x) ## S4 method for signature 'FIMSFrame' get_lengths(x) ## S4 method for signature 'data.frame' get_lengths(x) get_n_lengths(x) ## S4 method for signature 'FIMSFrame' get_n_lengths(x) ## S4 method for signature 'data.frame' get_n_lengths(x)
get_data(x) ## S4 method for signature 'FIMSFrame' get_data(x) ## S4 method for signature 'data.frame' get_data(x) get_fleets(x) ## S4 method for signature 'FIMSFrame' get_fleets(x) ## S4 method for signature 'data.frame' get_fleets(x) get_n_years(x) ## S4 method for signature 'FIMSFrame' get_n_years(x) ## S4 method for signature 'data.frame' get_n_years(x) get_start_year(x) ## S4 method for signature 'FIMSFrame' get_start_year(x) ## S4 method for signature 'data.frame' get_start_year(x) get_end_year(x) ## S4 method for signature 'FIMSFrame' get_end_year(x) ## S4 method for signature 'data.frame' get_end_year(x) get_ages(x) ## S4 method for signature 'FIMSFrame' get_ages(x) ## S4 method for signature 'data.frame' get_ages(x) get_n_ages(x) ## S4 method for signature 'FIMSFrame' get_n_ages(x) ## S4 method for signature 'data.frame' get_n_ages(x) get_lengths(x) ## S4 method for signature 'FIMSFrame' get_lengths(x) ## S4 method for signature 'data.frame' get_lengths(x) get_n_lengths(x) ## S4 method for signature 'FIMSFrame' get_n_lengths(x) ## S4 method for signature 'data.frame' get_n_lengths(x)
x |
An object returned from |
get_data()
returns a data frame of the class tbl_df
containing data for
a FIMS model in a long format. The tibble will potentially have the
following columns depending if it fits to ages and lengths or just one of
them:
type, name, age, length, datestart, dateend, value, unit, and uncertainty.
get_fleets()
returns a vector of integer values specifying which fleets in
the model are fishing fleets.
get_n_years()
returns an integer specifying the number of years in the
model.
get_start_year()
returns an integer specifying the start year of the
model.
get_end_year()
returns an integer specifying the end year of the
model.
get_ages()
returns a vector of age bins used in the model.
get_n_ages()
returns an integer specifying the number of age bins used in
the model.
get_lengths()
returns a vector of length bins used in the model.
get_n_lengths()
returns an integer specifying the number of length bins
used in the model.
Use methods::new()
to set up a distribution within an existing module with
the necessary linkages between the two. For example, a fleet module will need
a distributional assumption for parts of the data associated with it, which
requires the use of initialize_data_distribution()
, and a recruitment
module, like the Beverton–Holt stock–recruit relationship, will need a
distribution associated with the recruitment deviations, which requires
initialize_process_distribution()
.
initialize_data_distribution( module, family, sd = list(value = 1, estimated = FALSE), data_type = c("index", "agecomp", "lengthcomp") ) initialize_process_distribution( module, par, family, sd = list(value = 1, estimated = FALSE), is_random_effect = FALSE )
initialize_data_distribution( module, family, sd = list(value = 1, estimated = FALSE), data_type = c("index", "agecomp", "lengthcomp") ) initialize_process_distribution( module, par, family, sd = list(value = 1, estimated = FALSE), is_random_effect = FALSE )
module |
An identifier to a C++ fleet module that is linked to the data of interest. |
family |
A description of the error distribution and link function to
be used in the model. The argument takes a family class, e.g.,
|
sd |
A list of length two. The first entry is named |
data_type |
A string specifying the type of data that the distribution will be fit to. Allowable types include c, index, agecomp, lengthcomp and the default is c. |
par |
A string specifying the parameter name the distribution applies
to. Parameters must be members of the specified module. Use
|
is_random_effect |
A boolean indicating whether or not the process is estimated as a random effect. |
A reference class. is returned. Use methods::show()
to view the various
Rcpp class fields, methods, and documentation.
## Not run: # Set up a new data distribution n_years <- 30 # Create a new fleet module fleet <- methods::new(Fleet) # Create a distribution for the fleet module fleet_distribution <- initialize_data_distribution( module = fishing_fleet, family = lognormal(link = "log"), sd = list( value = rep(sqrt(log(0.01^2 + 1)), n_years), estimated = rep(FALSE, n_years) # Could also be a single FALSE ), data_type = "index" ) # Set up a new process distribution # Create a new recruitment module recruitment <- methods::new(BevertonHoltRecruitment) # view parameter names of the recruitment module methods::show(BevertonHoltRecruitment) # Create a distribution for the recruitment module recruitment_distribution <- initialize_process_distribution( module = recruitment, par = "log_devs", family = gaussian(), sd = list(value = 0.4, estimated = FALSE), is_random_effect = FALSE ) ## End(Not run)
## Not run: # Set up a new data distribution n_years <- 30 # Create a new fleet module fleet <- methods::new(Fleet) # Create a distribution for the fleet module fleet_distribution <- initialize_data_distribution( module = fishing_fleet, family = lognormal(link = "log"), sd = list( value = rep(sqrt(log(0.01^2 + 1)), n_years), estimated = rep(FALSE, n_years) # Could also be a single FALSE ), data_type = "index" ) # Set up a new process distribution # Create a new recruitment module recruitment <- methods::new(BevertonHoltRecruitment) # view parameter names of the recruitment module methods::show(BevertonHoltRecruitment) # Create a distribution for the recruitment module recruitment_distribution <- initialize_process_distribution( module = recruitment, par = "log_devs", family = gaussian(), sd = list(value = 0.4, estimated = FALSE), is_random_effect = FALSE ) ## End(Not run)
Initializes multiple modules within the Fisheries Integrated Modeling System (FIMS), including fleet, recruitment, growth, maturity, and population modules. This function iterates over the provided fleets, setting up necessary sub-modules such as selectivity, index, and age composition. It also sets up distribution models for fishery index and age-composition data.
initialize_fims(parameters, data)
initialize_fims(parameters, data)
parameters |
A list. Contains parameters and modules required for initialization. |
data |
An S4 object. FIMS input data. |
A list containing parameters for the initialized FIMS modules, ready for use in TMB modeling.
Verbosity is set globally for FIMS using
options(rlib_message_verbosity = "quiet")
to stop the printing of messages
from cli::cli_inform()
. Using a global option allows for verbose to not
have to be an argument to every function. All cli::cli_abort()
messages are
printed to the console no matter what the global option is set to.
is_fims_verbose()
is_fims_verbose()
A logical is returned where TRUE
ensures messages from cli::cli_inform()
are printed to the console.
# function is not exported ## Not run: FIMS:::is_fims_verbose() ## End(Not run)
# function is not exported ## Not run: FIMS:::is_fims_verbose() ## End(Not run)
Check if an object is of class FIMSFit
is.FIMSFit(x)
is.FIMSFit(x)
x |
Returned list from |
Check if an object is a list of FIMSFit objects
is.FIMSFits(x)
is.FIMSFits(x)
x |
List of fits returned from multiple calls to |
Family objects provide a convenient way to specify the details of the models
used by functions such as stats::glm()
. These functions within this
package are not available within the stats package but are designed in a
similar manner.
lognormal(link = "log") multinomial(link = "logit")
lognormal(link = "log") multinomial(link = "logit")
link |
A string specifying the model link function. For example,
|
An object of class family
(which has a concise print method). This
particular family has a truncated length compared to other distributions in
stats::family()
.
family |
character: the family name. |
link |
character: the link name. |
a_family <- multinomial() a_family[["family"]] a_family[["link"]]
a_family <- multinomial() a_family[["family"]] a_family[["link"]]
There is an accessor function for each data type needed to run a FIMS model.
A FIMS model accepts vectors of data and thus each of the m_*()
functions,
where the star can be replaced with the data type separated by underscores,
e.g., weight_at_age. These accessor functions are the preferred way to pass
data to a FIMS module because the data will have the appropriate indexing.
m_landings(x, fleet_name) ## S4 method for signature 'FIMSFrame' m_landings(x, fleet_name) ## S4 method for signature 'data.frame' m_landings(x, fleet_name) m_index(x, fleet_name) ## S4 method for signature 'FIMSFrame' m_index(x, fleet_name) ## S4 method for signature 'data.frame' m_index(x, fleet_name) m_agecomp(x, fleet_name) ## S4 method for signature 'FIMSFrame' m_agecomp(x, fleet_name) ## S4 method for signature 'data.frame' m_agecomp(x, fleet_name) m_lengthcomp(x, fleet_name) ## S4 method for signature 'FIMSFrame' m_lengthcomp(x, fleet_name) ## S4 method for signature 'data.frame' m_lengthcomp(x, fleet_name) m_weight_at_age(x) ## S4 method for signature 'FIMSFrame' m_weight_at_age(x) ## S4 method for signature 'data.frame' m_weight_at_age(x) m_age_to_length_conversion(x, fleet_name) ## S4 method for signature 'FIMSFrame' m_age_to_length_conversion(x, fleet_name) ## S4 method for signature 'data.frame' m_age_to_length_conversion(x, fleet_name)
m_landings(x, fleet_name) ## S4 method for signature 'FIMSFrame' m_landings(x, fleet_name) ## S4 method for signature 'data.frame' m_landings(x, fleet_name) m_index(x, fleet_name) ## S4 method for signature 'FIMSFrame' m_index(x, fleet_name) ## S4 method for signature 'data.frame' m_index(x, fleet_name) m_agecomp(x, fleet_name) ## S4 method for signature 'FIMSFrame' m_agecomp(x, fleet_name) ## S4 method for signature 'data.frame' m_agecomp(x, fleet_name) m_lengthcomp(x, fleet_name) ## S4 method for signature 'FIMSFrame' m_lengthcomp(x, fleet_name) ## S4 method for signature 'data.frame' m_lengthcomp(x, fleet_name) m_weight_at_age(x) ## S4 method for signature 'FIMSFrame' m_weight_at_age(x) ## S4 method for signature 'data.frame' m_weight_at_age(x) m_age_to_length_conversion(x, fleet_name) ## S4 method for signature 'FIMSFrame' m_age_to_length_conversion(x, fleet_name) ## S4 method for signature 'data.frame' m_age_to_length_conversion(x, fleet_name)
x |
An object returned from |
fleet_name |
A string, or vector of strings, specifying the name of the
fleet(s) of interest that you want landings data for. The strings must
exactly match strings in the column |
Age-to-length-conversion data, i.e., the proportion of age "a" that are length "l", are used to convert lengths (input data) to ages (modeled) as a way to fit length data without estimating growth.
All of the m_*()
functions return vectors of data. Currently, the order of
the data is the same order as the data frame because no arranging is done in
FIMSFrame()
and the function just extracts the appropriate column.
Ops include Arith (+
, -
, *
, ^
, %%
, %/%
, and /
);
Compare (==
, >
, <
, !=
, <=
, and >=
); and
Logic (&
, |
).
Methods of mathematical functions include trigonometry functions, abs
,
sign
, sqrt
, ceiling
, floor
, trunc
, cummax
, cumprod
, cumsum
,
log
, log10
, log2
, log1p
, exp
, expm1
, gamma
, lgamma
,
digamma
, and trigamma
.
## S4 method for signature 'Rcpp_Parameter,Rcpp_Parameter' Ops(e1, e2) ## S4 method for signature 'Rcpp_Parameter,numeric' Ops(e1, e2) ## S4 method for signature 'numeric,Rcpp_Parameter' Ops(e1, e2) ## S4 method for signature 'Rcpp_ParameterVector,Rcpp_ParameterVector' Ops(e1, e2) ## S4 method for signature 'Rcpp_ParameterVector,numeric' Ops(e1, e2) ## S4 method for signature 'numeric,Rcpp_ParameterVector' Ops(e1, e2) ## S4 method for signature 'Rcpp_ParameterVector' Math(x)
## S4 method for signature 'Rcpp_Parameter,Rcpp_Parameter' Ops(e1, e2) ## S4 method for signature 'Rcpp_Parameter,numeric' Ops(e1, e2) ## S4 method for signature 'numeric,Rcpp_Parameter' Ops(e1, e2) ## S4 method for signature 'Rcpp_ParameterVector,Rcpp_ParameterVector' Ops(e1, e2) ## S4 method for signature 'Rcpp_ParameterVector,numeric' Ops(e1, e2) ## S4 method for signature 'numeric,Rcpp_ParameterVector' Ops(e1, e2) ## S4 method for signature 'Rcpp_ParameterVector' Math(x)
e1 , e2
|
An Rcpp_Parameter or Rcpp_ParameterVector class object or a numeric vector or value. |
x |
An Rcpp_ParameterVector class object. |
A numeric or logical value(s) depending on the generic and the length of the input values.
A vector of numeric values.
Intended for developers to run the google test suite from R.
run_gtest(...)
run_gtest(...)
... |
Additional arguments to |
Intended for developers to set up their local environment and run the google test suite from R.
setup_and_run_gtest(...)
setup_and_run_gtest(...)
... |
Additional arguments to |
Intended for developers to set up their local environment prior to running the integration tests.
setup_gtest()
setup_gtest()
## Not run: setup_gtest() ## End(Not run)
## Not run: setup_gtest() ## End(Not run)