fit_length_weight | R Documentation |
For use with data for a single species.
fit_length_weight(
dat,
sex = c("female", "male", "all"),
downsample = Inf,
min_samples = 50L,
method = c("tmb", "rlm", "lm"),
df = 3,
too_high_quantile = 1,
usability_codes = c(0, 1, 2, 6),
scale_weight = 1/1000
)
dat |
Input data frame. Should be from |
sex |
Either "male" or "female". |
downsample |
If not |
min_samples |
The minimum number of fish before a model will be fit. |
method |
|
df |
The fixed degrees of freedom to use if |
too_high_quantile |
A quantile above which to discard weights and lengths. Can be useful for outliers. Defaults to including all data. |
usability_codes |
An optional vector of usability codes.
All usability codes not in this vector will be omitted.
Set to |
scale_weight |
A value to multiply all weights by. Useful for changing units. |
## Not run:
d <- gfdata::get_survey_samples("pacific ocean perch")
model_f <- fit_length_weight(d, sex = "female")
model_m <- fit_length_weight(d, sex = "male")
plot_length_weight(object_female = model_f, object_male = model_m)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.