Skip to contents

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 model_*() 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.

Usage

model_landings(x, fleet_name)

# S4 method for class 'FIMSFrame'
model_landings(x, fleet_name)

# S4 method for class 'data.frame'
model_landings(x, fleet_name)

model_index(x, fleet_name)

# S4 method for class 'FIMSFrame'
model_index(x, fleet_name)

# S4 method for class 'data.frame'
model_index(x, fleet_name)

model_age_comp(x, fleet_name)

# S4 method for class 'FIMSFrame'
model_age_comp(x, fleet_name)

# S4 method for class 'data.frame'
model_age_comp(x, fleet_name)

model_length_comp(x, fleet_name)

# S4 method for class 'FIMSFrame'
model_length_comp(x, fleet_name)

# S4 method for class 'data.frame'
model_length_comp(x, fleet_name)

model_weight_at_age(x)

# S4 method for class 'FIMSFrame'
model_weight_at_age(x)

# S4 method for class 'data.frame'
model_weight_at_age(x)

model_age_to_length_conversion(x)

# S4 method for class 'FIMSFrame'
model_age_to_length_conversion(x)

# S4 method for class 'data.frame'
model_age_to_length_conversion(x)

Arguments

x

An object returned from FIMSFrame().

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 "name" of get_data(x).

Value

All of the model_*() 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.

Details

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.

model_landings()

Returns a numeric vector of landings data (type "landings") for the specified fleet(s).

model_index()

Returns a numeric vector of index data (type "index") for the specified fleet(s).

model_age_comp()

Returns a numeric vector of age-composition data (type "age_comp") for the specified fleet(s).

model_length_comp()

Returns a numeric vector of length-composition data (type "length_comp") for the specified fleet(s). This accessor requires that age-to-length conversion data are present in the FIMSFrame object.

model_weight_at_age()

Returns a numeric vector of weight-at-age values (type "weight_at_age"), ordered by age and year (plus one additional year) and using -999 to indicate missing values. When multiple fleets are present, values are averaged across fleets.

model_age_to_length_conversion()

Returns a numeric vector of age-to-length conversion values. Values are ordered by age and length in the order defined by FIMSFrame(). When multiple values are present across a single age and length, they are averaged because age_to_length_conversion data cannot vary across fleets or time.