Package: rescomp 1.0.0

Christopher R P Brown

rescomp: Efficient Modelling of Resource Competition

Generate, simulate and visualise ODE models of consumer-resource interactions. At its core, 'rescomp' provides a resource competition modelling focused interface to 'deSolve', alongside flexible functions for visualising model properties and dynamics. More information, documentation and examples can be found on the package website.

Authors:Christopher R P Brown [aut, cre], Jan Engelstaedter [aut], Andrew Letten [aut]

rescomp_1.0.0.tar.gz
rescomp_1.0.0.zip(r-4.7-any)rescomp_1.0.0.zip(r-4.6-any)rescomp_1.0.0.zip(r-4.5-any)
rescomp_1.0.0.tgz(r-4.6-any)rescomp_1.0.0.tgz(r-4.5-any)
rescomp_1.0.0.tar.gz(r-4.7-any)rescomp_1.0.0.tar.gz(r-4.6-any)
rescomp_1.0.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION
card.svg |card.png
rescomp/json (API)

# Install 'rescomp' in R:
install.packages('rescomp', repos = c('https://pyrrhicpachyderm.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/pyrrhicpachyderm/rescomp/issues

On CRAN:

Conda:

5.00 score 370 downloads 42 exports 30 dependencies

Last updated from:988c50e278. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK193
source / vignettesOK279
linux-releaseOK185
macos-releaseOK258
macos-oldrelOK189
windows-develOK119
windows-releaseOK115
windows-oldrelOK114
wasm-releaseOK119

Exports:apply_eventcrmatrixdef_cr_odeevent_batch_transferevent_res_addevent_res_customevent_res_multevent_schedule_fixedevent_schedule_periodicevent_set_introseqevent_sp_addevent_sp_customevent_sp_multframe_and_namefuncresp_customfuncresp_hillfuncresp_monodfuncresp_type1funcresp_type2funcresp_type3get_coefsget_coefs_matrixget_coefs_vectorget_event_timesget_funcrespget_paramsget_ressupplyplot_funcrespplot_rescomprescomp_coefs_lerprescomp_coefs_matrix_customrescomp_coefs_vector_customrescomp_param_customrescomp_param_sinerescomp_param_squarerescomp_param_triangleressupply_chemostatressupply_constantressupply_customressupply_logisticsim_rescompspec_rescomp

Dependencies:clicpp11deSolvedplyrfarvergenericsggplot2gluegtableisobandlabelinglifecyclemagrittrpillarpkgconfigpurrrR6RColorBrewerrlangS7scalesstringistringrtibbletidyrtidyselectutf8vctrsviridisLitewithr

Reproducing studies in resource competition with rescomp
Huisman and Weissing (1999) | Grover (1990) | Armstrong and McGehee (1980)

Last update: 2026-03-04
Started: 2021-08-26

rescomp: An R package for efficient ODE modelling of resource competition
Model formulation | Consumer equations | Resource equations | Using rescomp | Type 2 consumer on a logistically growing resource | Type 2 consumer on a continuously supplied resource | Two type 2 consumers on a logistically growing resource | Two type 1 consumers and two substitutable resources in a chemostat | Two type 1 consumers and two essential resources in a chemostat | Two type 2 consumers and one externally pulsed resource (continuous mortality) | Two type 2 consumers and one externally pulsed resource (serial transfer with pulsed mortality) | Two type 2 consumers with time dependent consumption parameters and one continuously supplied resource | Three type 1 consumers on three essential resources generating an intransitive loop (i.e. rock paper scissors dynamics).

Last update: 2026-03-03
Started: 2021-08-26

Readme and manuals

Help Manual

Help pageTopics
Applies a 'rescomp_event' object to modify state variablesapply_event
Shorthand to create a matrix with 'spnum' rows and 'resnum' columnscrmatrix
Define consumer resource ODE functiondef_cr_ode
Define an event in which the species and resources are diluted by addition of new mediumevent_batch_transfer
Define an event in which a constant amount of some resources is added to (or removed from) the systemevent_res_add
Define an event which instantaneously changes resource concentrations using an arbitrary functionevent_res_custom
Define an event in which the resource populations are multiplied by some factorevent_res_mult
Define a schedule of an event occurring at a fixed set of timesevent_schedule_fixed
Define a schedule of an event occurring repeatedly at a fixed periodevent_schedule_periodic
Define a schedule of one-off species introductions: one for each species.event_set_introseq
Define an event in which a constant amount of some consumers is added to (or removed from) the systemevent_sp_add
Define an event which instantaneously changes species concentrations using an arbitrary functionevent_sp_custom
Define an event in which the consumer populations are multiplied by some factorevent_sp_mult
Convert object of class deSolve to a data frame and name columnsframe_and_name
Define a functional response using an arbitrary functionfuncresp_custom
Define a Hill functional responsefuncresp_hill
Define a Monod functional responsefuncresp_monod
Define a linear functional responsefuncresp_type1
Define a Holling type 2 functional responsefuncresp_type2
Define a Holling type 3 functional responsefuncresp_type3
Get coefficients from a vector/matrix or 'rescomp_coefs_vector'/'rescomp_coefs_matrix' objectget_coefs get_coefs_matrix get_coefs_vector
Gets the list of times from a 'rescomp_event_schedule' objectget_event_times
Get growth rates from a 'rescomp_funcresp' objectget_funcresp
Get params at an instant in time from a 'rescomp_param' objectget_params
Get resource supply rates from a 'rescomp_ressupply' objectget_ressupply
Plot functional responsesplot_funcresp
Plot consumer and resource dynamics from deSolve outputplot_rescomp
Create a set of coefficients by linear interpolationrescomp_coefs_lerp
Create a matrix of coefficients using an arbitrary functionrescomp_coefs_matrix_custom
Create a vector of coefficients using an arbitrary functionrescomp_coefs_vector_custom
Create a rescomp parameter using an arbitrary functionrescomp_param_custom
Create a rescomp parameter using a sine/square/triangle waverescomp_param_sine rescomp_param_square rescomp_param_triangle
Create a resource supply rate using chemostat dynamicsressupply_chemostat
Create a resource supply rate using a constant rate resource supplyressupply_constant
Create a resource supply rate using an arbitrary functionressupply_custom
Create a resource supply rate using logistic resource growthressupply_logistic
Simulate resource competition (a convenience wrapper for 'deSolve::ode()')sim_rescomp
Generate list of parameters for a consumer-resource model to be passed to 'sim_rescomp()'spec_rescomp