Converts IPM kernels into long data frames. These are useful for
creating plots using ggplot2
.
ipm_to_df(ipm, ...)
# S3 method for class 'array'
ipm_to_df(ipm, ...)
# Default S3 method
ipm_to_df(ipm, ..., mega_mat, name_ps = NULL, f_forms = NULL)
Output from make_ipm
.
Other arguments passed to methods.
A vector with symbols, I's, and/or 0s representing the matrix blocks.
They should be specified in ROW MAJOR order! Can also be a character
string specifying the call. Parameter set index syntax is supported. When used,
format_mega_kernel
will produce as many mega-matrices as there are
combinations of par_set_indices
in the proto_ipm
.
The prefix(es) for the kernel name that correspond to survival
and growth/maturation of existing individuals. For the model
K = P_age + F_age
, this would be "P"
. Only applies to
age X size models. The "_age"
suffix is appended automatically, so
does not need to be supplied.
The names of the kernels that correspond to production of new
individuals, and possibly, how they are combined. For example, a model that
includes sexual (with an "F" kernel) and asexual reproduction (with a "C" kernel),
this would be "F + C"
. If data come from multiple sites or years,
then this information is supplied using the index syntax (i.e.
f_forms = "F_yr + C_yr"
). Only applies to age X size models. The
"_age"
index is appended automatically, so does not need to be
supplied.
A data frame with 3 columns named "t"
, "t_1"
, and
"value"
.