Package: cxr 1.1.1

David Garcia-Callejas

cxr: A Toolbox for Modelling Species Coexistence in R

Recent developments in modern coexistence theory have advanced our understanding on how species are able to persist and co-occur with other species at varying abundances. However, applying this mathematical framework to empirical data is still challenging, precluding a larger adoption of the theoretical tools developed by empiricists. This package provides a complete toolbox for modelling interaction effects between species, and calculate fitness and niche differences. The functions are flexible, may accept covariates, and different fitting algorithms can be used. A full description of the underlying methods is available in García-Callejas, D., Godoy, O., and Bartomeus, I. (2020) <doi:10.1111/2041-210X.13443>. Furthermore, the package provides a series of functions to calculate dynamics for stage-structured populations across sites.

Authors:David Garcia-Callejas [aut, cre], Ignasi Bartomeus [aut], Oscar Godoy [aut], Maxime Lancelot [ctb], Maria Paniw [ctb]

cxr_1.1.1.tar.gz
cxr_1.1.1.zip(r-4.5)cxr_1.1.1.zip(r-4.4)cxr_1.1.1.zip(r-4.3)
cxr_1.1.1.tgz(r-4.4-any)cxr_1.1.1.tgz(r-4.3-any)
cxr_1.1.1.tar.gz(r-4.5-noble)cxr_1.1.1.tar.gz(r-4.4-noble)
cxr_1.1.1.tgz(r-4.4-emscripten)cxr_1.1.1.tgz(r-4.3-emscripten)
cxr.pdf |cxr.html
cxr/json (API)
NEWS

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

Peer review:

Bug tracker:https://github.com/radicalcommecol/cxr/issues

Datasets:

On CRAN:

6.51 score 10 stars 27 scripts 188 downloads 69 exports 7 dependencies

Last updated 1 years agofrom:eb37479fff. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 12 2024
R-4.5-winOKNov 12 2024
R-4.5-linuxOKNov 12 2024
R-4.4-winOKNov 12 2024
R-4.4-macOKNov 12 2024
R-4.3-winOKNov 12 2024
R-4.3-macOKNov 12 2024

Exports:abundance_projectionavg_fitness_diffBH_er_lambdacov_global_effectcov_global_responsecov_globalBH_er_lambdacov_none_effectcov_none_responsecov_noneBH_pm_alpha_global_lambdacov_none_alphacov_noneBH_pm_alpha_none_lambdacov_none_alphacov_noneBH_pm_alpha_pairwise_lambdacov_global_alphacov_globalBH_pm_alpha_pairwise_lambdacov_global_alphacov_pairwiseBH_pm_alpha_pairwise_lambdacov_none_alphacov_noneBH_project_alpha_global_lambdacov_none_alphacov_noneBH_project_alpha_none_lambdacov_none_alphacov_noneBH_project_alpha_pairwise_lambdacov_global_alphacov_globalBH_project_alpha_pairwise_lambdacov_global_alphacov_pairwiseBH_project_alpha_pairwise_lambdacov_none_alphacov_nonebuild_paramcalculate_densitiescompetitive_abilitycxr_er_bootstrapcxr_er_fitcxr_generate_test_datacxr_pm_bootstrapcxr_pm_fitcxr_pm_multifitdensities_to_dffill_demography_matrixfill_dispersal_matrixfill_transition_matrixfitness_ratiogenerate_vital_rate_coefsLV_er_lambdacov_global_effectcov_global_responsecov_globalLV_er_lambdacov_none_effectcov_none_responsecov_noneLV_pm_alpha_global_lambdacov_none_alphacov_noneLV_pm_alpha_none_lambdacov_none_alphacov_noneLV_pm_alpha_pairwise_lambdacov_global_alphacov_globalLV_pm_alpha_pairwise_lambdacov_global_alphacov_pairwiseLV_pm_alpha_pairwise_lambdacov_none_alphacov_noneLV_project_alpha_global_lambdacov_none_alphacov_noneLV_project_alpha_none_lambdacov_none_alphacov_noneLV_project_alpha_pairwise_lambdacov_global_alphacov_globalLV_project_alpha_pairwise_lambdacov_global_alphacov_pairwiseLV_project_alpha_pairwise_lambdacov_none_alphacov_noneLW_er_lambdacov_global_effectcov_global_responsecov_globalLW_er_lambdacov_none_effectcov_none_responsecov_noneLW_pm_alpha_global_lambdacov_none_alphacov_noneLW_pm_alpha_none_lambdacov_none_alphacov_noneLW_pm_alpha_pairwise_lambdacov_global_alphacov_globalLW_pm_alpha_pairwise_lambdacov_global_alphacov_pairwiseLW_pm_alpha_pairwise_lambdacov_none_alphacov_noneLW_project_alpha_global_lambdacov_none_alphacov_noneLW_project_alpha_none_lambdacov_none_alphacov_noneLW_project_alpha_pairwise_lambdacov_global_alphacov_globalLW_project_alpha_pairwise_lambdacov_global_alphacov_pairwiseLW_project_alpha_pairwise_lambdacov_none_alphacov_noneniche_overlapRK_er_lambdacov_global_effectcov_global_responsecov_globalRK_er_lambdacov_none_effectcov_none_responsecov_noneRK_pm_alpha_global_lambdacov_none_alphacov_noneRK_pm_alpha_none_lambdacov_none_alphacov_noneRK_pm_alpha_pairwise_lambdacov_global_alphacov_globalRK_pm_alpha_pairwise_lambdacov_global_alphacov_pairwiseRK_pm_alpha_pairwise_lambdacov_none_alphacov_noneRK_project_alpha_global_lambdacov_none_alphacov_noneRK_project_alpha_none_lambdacov_none_alphacov_noneRK_project_alpha_pairwise_lambdacov_global_alphacov_globalRK_project_alpha_pairwise_lambdacov_global_alphacov_pairwiseRK_project_alpha_pairwise_lambdacov_none_alphacov_nonespecies_fitnessvec_permutation_matricesvital_rate

Dependencies:latticeMatrixmvtnormnloptrnumDerivoptimxpracma

Projecting species abundances

Rendered fromV5_Abundance_projections.Rmdusingknitr::rmarkdownon Nov 12 2024.

Last update: 2020-06-24
Started: 2020-03-26

Coexistence metrics

Rendered fromV3_Coexistence_metrics.Rmdusingknitr::rmarkdownon Nov 12 2024.

Last update: 2020-06-24
Started: 2020-02-28

Data formats

Rendered fromV2_Data_formats.Rmdusingknitr::rmarkdownon Nov 12 2024.

Last update: 2020-03-26
Started: 2020-02-12

Getting started with cxr

Rendered fromV1_Getting_started.Rmdusingknitr::rmarkdownon Nov 12 2024.

Last update: 2021-10-03
Started: 2020-03-29

Metapopulation projections

Rendered fromV6_Metapopulation_projections.Rmdusingknitr::rmarkdownon Nov 12 2024.

Last update: 2023-03-31
Started: 2022-02-01

Using your own models

Rendered fromV4_Models.Rmdusingknitr::rmarkdownon Nov 12 2024.

Last update: 2020-06-24
Started: 2020-03-26

Readme and manuals

Help Manual

Help pageTopics
Abundance measurementsabundance
Project abundances from population dynamics modelsabundance_projection
Average fitness differencesavg_fitness_diff
Effect response Beverton-Holt model with covariate effects on lambda, effect, and responseBH_er_lambdacov_global_effectcov_global_responsecov_global
Effect response model without covariate effectsBH_er_lambdacov_none_effectcov_none_responsecov_none
Beverton-Holt model with a global alpha and no covariate effectsBH_pm_alpha_global_lambdacov_none_alphacov_none
Beverton-Holt model with no alphas and no covariate effectsBH_pm_alpha_none_lambdacov_none_alphacov_none
Beverton-Holt model with pairwise alphas and global covariate effects on lambda and alphaBH_pm_alpha_pairwise_lambdacov_global_alphacov_global
Beverton-Holt model with pairwise alphas, covariate effects on lambda, and pairwise covariate effects on alphaBH_pm_alpha_pairwise_lambdacov_global_alphacov_pairwise
Beverton-Holt model with pairwise alphas and no covariate effectsBH_pm_alpha_pairwise_lambdacov_none_alphacov_none
Beverton-Holt model for projecting abundances, with a global alpha and no covariate effectsBH_project_alpha_global_lambdacov_none_alphacov_none
Beverton-Holt model for projecting abundances, with no alpha and no covariate effectsBH_project_alpha_none_lambdacov_none_alphacov_none
Beverton-Holt model for projecting abundances, with specific alpha values and global covariate effects on alpha and lambdaBH_project_alpha_pairwise_lambdacov_global_alphacov_global
Beverton-Holt model for projecting abundances, with specific alpha values and global covariate effects on alpha and lambdaBH_project_alpha_pairwise_lambdacov_global_alphacov_pairwise
Beverton-Holt model for projecting abundances, with specific alpha values and no covariate effectsBH_project_alpha_pairwise_lambdacov_none_alphacov_none
Build param structurebuild_param
Obtain species densities from transition matricescalculate_densities
Competitive ability among pairs of speciescompetitive_ability
standard error estimates for effect and response parameterscxr_er_bootstrap
General optimization for effect-response modelscxr_er_fit
Generate simulated interaction datacxr_generate_test_data
Standard error estimates for model parameterscxr_pm_bootstrap
General optimization for population modelscxr_pm_fit
Multi-species parameter optimizationcxr_pm_multifit
Converts a densities list to a tidy dataframedensities_to_df
Fill the vec-permutation demography matrixfill_demography_matrix
Fill the vec-permutation dispersal matrixfill_dispersal_matrix
Fill a transition matrixfill_transition_matrix
Fitness ratio among two or more speciesfitness_ratio
Generate coefficients for obtaining vital ratesgenerate_vital_rate_coefs
Generalized linear model coefficientsglm_example_coefs
Effect response Lotka-Volterra model with covariate effects on lambda, effect, and responseLV_er_lambdacov_global_effectcov_global_responsecov_global
Effect response Lotka-Volterra model without covariate effectsLV_er_lambdacov_none_effectcov_none_responsecov_none
Lotka-Volterra model with a global alpha and no covariate effectsLV_pm_alpha_global_lambdacov_none_alphacov_none
Lotka-Volterra model with no alphas and no covariate effectsLV_pm_alpha_none_lambdacov_none_alphacov_none
Lotka-Volterra model with pairwise alphas and global covariate effects on lambda and alphaLV_pm_alpha_pairwise_lambdacov_global_alphacov_global
Lotka-Volterra model with pairwise alphas, covariate effects on lambda, and pairwise covariate effects on alphaLV_pm_alpha_pairwise_lambdacov_global_alphacov_pairwise
Lotka-Volterra model with pairwise alphas and no covariate effectsLV_pm_alpha_pairwise_lambdacov_none_alphacov_none
Lotka-Volterra model for projecting abundances, with a global alpha and no covariate effectsLV_project_alpha_global_lambdacov_none_alphacov_none
Model for projecting abundances, with no alpha and no covariate effectsLV_project_alpha_none_lambdacov_none_alphacov_none
Lotka-Volterra model for projecting abundances, with specific alpha values and global covariate effects on alpha and lambdaLV_project_alpha_pairwise_lambdacov_global_alphacov_global
Lotka-Volterra model for projecting abundances, with specific alpha values and global covariate effects on alpha and lambdaLV_project_alpha_pairwise_lambdacov_global_alphacov_pairwise
Lotka-Volterra model for projecting abundances, with specific alpha values and no covariate effectsLV_project_alpha_pairwise_lambdacov_none_alphacov_none
Effect response Law-Watkinson model with covariate effects on lambda, effect, and responseLW_er_lambdacov_global_effectcov_global_responsecov_global
Effect response Law-Watkinson model without covariate effectsLW_er_lambdacov_none_effectcov_none_responsecov_none
Law-Watkinson model with a global alpha and no covariate effectsLW_pm_alpha_global_lambdacov_none_alphacov_none
Law-Watkinson model with no alphas and no covariate effectsLW_pm_alpha_none_lambdacov_none_alphacov_none
Law-Watkinson model with pairwise alphas and global covariate effects on lambda and alphaLW_pm_alpha_pairwise_lambdacov_global_alphacov_global
Law-Watkinson model with pairwise alphas, covariate effects on lambda, and pairwise covariate effects on alphaLW_pm_alpha_pairwise_lambdacov_global_alphacov_pairwise
Law-Watkinson model with pairwise alphas and no covariate effectsLW_pm_alpha_pairwise_lambdacov_none_alphacov_none
Law-Watkinson model for projecting abundances, with a global alpha and no covariate effectsLW_project_alpha_global_lambdacov_none_alphacov_none
Model for projecting abundances, with no alpha and no covariate effectsLW_project_alpha_none_lambdacov_none_alphacov_none
Law-Watkinson model for projecting abundances, with specific alpha values and global covariate effects on alpha and lambdaLW_project_alpha_pairwise_lambdacov_global_alphacov_global
Law-Watkinson model for projecting abundances, with specific alpha values and global covariate effects on alpha and lambdaLW_project_alpha_pairwise_lambdacov_global_alphacov_pairwise
Law-Watkinson model for projecting abundances, with specific alpha values and no covariate effectsLW_project_alpha_pairwise_lambdacov_none_alphacov_none
Metapopulation dynamics coefficientsmetapopulation_example_param
neighbours and fitness observationsneigh_list
Niche overlap between two speciesniche_overlap
Effect response Beverton-Holt model with covariate effects on lambda, effect, and responseRK_er_lambdacov_global_effectcov_global_responsecov_global
Effect response Ricker model without covariate effectsRK_er_lambdacov_none_effectcov_none_responsecov_none
Ricker model with a global alpha and no covariate effectsRK_pm_alpha_global_lambdacov_none_alphacov_none
Ricker model with no alphas and no covariate effectsRK_pm_alpha_none_lambdacov_none_alphacov_none
Ricker model with pairwise alphas and global covariate effects on lambda and alphaRK_pm_alpha_pairwise_lambdacov_global_alphacov_global
Ricker model with pairwise alphas, covariate effects on lambda, and pairwise covariate effects on alphaRK_pm_alpha_pairwise_lambdacov_global_alphacov_pairwise
Ricker model with pairwise alphas and no covariate effectsRK_pm_alpha_pairwise_lambdacov_none_alphacov_none
Ricker model for projecting abundances, with a global alpha and no covariate effectsRK_project_alpha_global_lambdacov_none_alphacov_none
Model for projecting abundances, with no alpha and no covariate effectsRK_project_alpha_none_lambdacov_none_alphacov_none
Ricker model for projecting abundances, with specific alpha values and global covariate effects on alpha and lambdaRK_project_alpha_pairwise_lambdacov_global_alphacov_global
Ricker model for projecting abundances, with specific alpha values and global covariate effects on alpha and lambdaRK_project_alpha_pairwise_lambdacov_global_alphacov_pairwise
Ricker model for projecting abundances, with specific alpha values and no covariate effectsRK_project_alpha_pairwise_lambdacov_none_alphacov_none
Salinity measurementssalinity_list
spatial arrangement of the observationsspatial_sampling
Fitness of a speciesspecies_fitness
Species germination and survival ratesspecies_rates
CXR summary method for effect response model fitssummary.cxr_er_fit
CXR summary method for population model fitssummary.cxr_pm_fit
CXR summary method for multispecies fitssummary.cxr_pm_multifit
Generate templates for dispersal, demography, and permutation matricesvec_permutation_matrices
Vital rate calculationvital_rate