This is just a helper function to assign the needed attributes and classes
to a data.frame that is produced by either make_alk or
make_halk.
assign_alk_attributes(
data,
size_col = "length",
age_col = "age",
autobin = TRUE,
size_bin = 1,
min_age = NULL,
plus_group = NULL,
alk_n = NULL,
classes = "alk",
dnorm_params = NULL,
levels = NULL
)A data.frame with associated attributes assigned
A data.frame
Character. Name of the column representing sizes
Character. Name of the column representing ages
Logical to set the attribute of autobin
Numeric. What is the width of size bins
Numeric. The minimum age that was included in the alk
Numeric. The age that represents the plus group
Numeric. The number of samples that went into creating the alk
Character. The class that should get prepended to the data.frame class(es)
The value of parameters that went into creating the normal distributions on the age groups
Character vector of the levels used. This creates the "levels" attribute if present