Releases: padrinoDB/ipmr
ipmr v0.0.6
This is a maintenance to release to ensure compatibility with the upcoming release of purrr
. There aren't any major changes. A couple features have been added, and some bugs have been fixed.
Features
- Adds an
as.matrix()
method foripmr_ipm
andipmr_matrix
. This strips theipmr_matrix
class away, and returns a matrix/array object. When called on anipmr_ipm
, it returns a list of sub-kernels that are just standard matrix/array objects. Thanks for @Aariq for requesting this (#63).
Bug fixes
-
The title in
conv_plot
is now correctly updated when there are multiple parameter sets used to construct an IPM. Previously, the title was always something likelamdba_1
, regardless of which level of parameter set was being plotted. Thanks to @SanneE1 for pointing this out (#64). -
Clarifies some error messages.
-
Removes automatic faceting in
plot.*
, as that usually failed when too many kernels were present. Instead, just use thenrow
andncol
arguments to the function now.
ipmr 0.0.5
ipmr 0.0.5
Contains a number of bug fixes and some new functionality. The latter are mostly related to PADRINO models, and shouldn't have too much of an effect on existing user-specified IPMs.
Features
-
Adds
return_sub_kernels
argument tomake_ipm()
for*_stoch_param
and all density dependent methods. This is due to the large RAM footprint that these objects can occupy, particularly for long running models. The default isFALSE
, which will save considerable memory space. Can be set toTRUE
for downstream analyses that require sub-kernels/iteration kernels. -
Prettier printing method for PADRINO objects/lists of user-specified models.
-
Prettier warnings for
left/right_ev()
-
Depending on your view, this may be a bug fix: updates the
log
argument inlambda()
so that it only changes the scale, NOT the calculation method. The prior behavior was documented, but unlikely to be intuitive, and so caused some confusion. Thanks to @Aariq for pointing this out. -
For stochastic IPMs,
is_conv_to_asymptotic()
andconv_plot()
now check for convergence in stochastic lambda. That is, they use a cumulative meanlog(lambda)
over iterations after discarding a burn-in. Thanks to @Aariq for implementing this in #45. -
Adds experimental function
make_ipm_report()
. This function convertsproto_ipm
objects into Rmarkdown documents that, when rendered, contain the equations and parameters used to implement the model in Latex. See the function documentation for more details, and report bugs/notation quirks/preferences in the issue tracker.
Bug fixes
-
Fixes bug in normalization of left/right eigenvectors in simple density independent stochastic models. (thanks to @Aariq)
-
Fixes bug where
"drop_levels"
was not recognized in some parameter set indexed models. -
Fixes bug where parameter set levels were recycled in some cases.
-
Fixes bug in
lambda()
wherelog = TRUE
had no effect when the IPM was stochastic andtype_lambda
was'last'
or'all'
. -
Switched from
all.equal
to absolute tolerance. @Aariq in #52. -
Fixes bug where the value of
lambda()
was named for determinstic models and unnamed for stochastic models. @Aariq in #57. -
Fixes bug in
make_ipm()
where a user-specified sequence wasn't getting used correctly for certain model classes. @Aariq in #58. -
Warnings about
NA
s indata_list
are no longer raised for model objects.
ipmr 0.0.4
ipmr 0.0.4
Contains small tweaks, bug fixes, and new feature additions. There shouldn't be any breaking changes to the API.
Features
-
Adds
log
argument tolambda
so users can choose which scale to return. The default isTRUE
for stochastic models andFALSE
for deterministic models. -
Allows named expressions in
define_env_state()
such that the names of the expressions may be used indefine_kernel()
. Before, the name of the expression didn't matter, only the names of the outputted list. Now, this will also work as well.
define_env_state(proto_ipm,
temp = rnorm(1, 20, 3),
precip = rgamma(1, 400, 2),
data_list = list())
-
More unit tests for parameter resampled models.
-
Removed innocuous warning messages. Added warnings for
NA
values in a fewdefine_*
functions and errors when they're produced in sub-kernels. -
Added the
ipmr_ipm
class so that most functions can tell the difference between aPADRINO
object and anipmr
object. -
Changes argument
tol
totolerance
inis_conv_to_asymptotic()
for consistency with other function/argument names.
Bug fixes
-
corrects a bug where functions in the
define_env_state
data_list
argument weren't recognized. -
corrects bug in
left_ev()
andright_ev()
where parameter set indices were ignored for deterministic models.
v0.0.3
ipmr 0.0.3
Contains a some tweaks and bug fixes, and a few new features:
Features
-
Implements
right_ev()
andleft_ev()
methods for stochastic models. -
Adds a new function,
conv_plot()
, to graphically check for convergence to asymptotic dynamics in deterministic models. -
Adds a new function,
discretize_pop_vector()
, to compute the empirical density function for a population trait distribution given a set of observed trait values. -
Adds print methods for density dependent models.
-
Adds
log
argument forlambda
(#27).
Bug fixes
-
Corrects bug where
tol
argument was ignored inis_conv_to_asymptotic()
. -
Gives output from
lambda()
names. Before, outputs from deterministic models with many parameter sets became hard to follow.
Version 0.0.2
ipmr 0.0.2
This version coincides with a revision submitted to Methods in Ecology and Evolution. It contains a some tweaks and bug fixes, and is available on CRAN. There is one major API change that renames parameters in define_kernel
.
-
Renames function arguments
hier_effs
->par_sets
,levels_ages
/levels_hier_effs
->age_indices
/par_set_indices
. The idea was to shift from thinking about these IPMs as resulting from multilevel/hierarchical regresssion models to IPMs constructed from parameter sets (which can be derived from any number of other methods). -
Corrects some bugs that caused
vital_rate_funs()
to break forstoch_param
and density dependent models. -
Updates the age X size model interface so that
max_age
kernels can be specified separately if they have different functional forms from their non-max_age
versions. -
make_iter_kernel
can handle computations passed intomega_mat
(e.g.mega_mat = c(P + F, 0, I, C))
. -
Makes
plot.ipmr_matrix
more flexible, which is now the recommended defaultplot
method foripm
objects. -
Changes to internal code that won't affect user experience.
Initial CRAN release
This is the first stable version of ipmr
available on CRAN.
This release provides methods for implement simple and general, density-(in)dependent, and deterministic and stochastic models. There are two further options for implementing latter. Age X size models are implemented as well. All classes of model have tools for correcting for eviction, defining initial conditions, and quickly modifying + rebuilding with new parameters/functional forms.
It also provides tools for:
-
simple asymptotic analyses (
lambda
,right_ev
,left_ev
,make_iter_kernel
) -
simple stochastic analyses (
lambda
,mean_kernel
) -
plotting (
plot
,ipm_to_df
)
More details are available on the package's website.