An R package that provides functions for undertaking epiphytotic modelling and simulation studies in R.
epiphytoolR aims
This package aims to be a collaborative project to provide a suite of functions for epidemiologists to build models from. The functions should be at their most basic and easy to adapt to the various epidemiological models. We hope this becomes a dependency for many more models. We welcome contributions additional branches to explore additional functionality and features.
What epiphytoolR is not
This does not provide full epidemiological models. See the following R packages for flexible complete models:
Co-pilot suggestions
not yet vetted
- EpiDynamics
- EpiILM
- EpiNow2
- EpiEstim
- EpiCurve
- EpiModel
- epiR
- epiDisplay
How to install
epiphytoolR
is not on CRAN but is aimed for a release sometime in 2025.
You can install a stable version from the main
branch with the following code
remotes::install_github("PaulMelloy/epiphytoolR")
Or you can install the development version from the development (dev
) branch with the following command in R
remotes::install_github("PaulMelloy/epiphytoolR", ref = "dev")
The dev
branch will have newer bug fixes and more features, see NEWS.md. However may have new bugs yet to be fully tested
How to contribute
Reporting bugs
Create an issue on this repo.
Contributing code
- Fork the repo make changes and create a pull request.
- Request contribute access in the pull request.
Contributing is easy, you may notice the reuse of common functions in plant epidemiological modelling. Translate these equations to R code and add them to this package through a pull request.
Contribution Example
can become a function
calc_spores <- function(x, a, con, b){
return(a * (x + con) ^ (-b))
}
Also use roxygen headers to describe the function in the file. ‘Ctrl + Alt + Shift + R’ Inserts an Roxygen header skeleton to edit.
#' Estimate spore dispersal
#'
#' @description
#' A modified inverse power function redescribed by Severns et al. (2018).
#' "Consequences of Long-Distance Dispersal for Epidemic Spread: Patterns,
#' Scaling, and Mitigation"
#'
#'
#' @source <https://doi.org/10.1094/PDIS-03-18-0505-FE>
#'
#' @param x numeric, distance from source lesion in meters
#' @param a numeric, a constant proportional to the amount of source inoculum
#' @param con numeric, a constant that allows for a finite amount of disease at the source
#' @param b numeric, modifies the steepness of the curve
#'
#' @return numeric, The number of effective spores, or infections per unit area
#' @export
#'
#' @examples
#' calc_spores(x = 5,a = 1000, con = 3, b = 4)
Function naming
Function naming should be concise and have the consistent use of prefixes as follows. - est_
estimate, usually used when the function or equation is based on empirical evidence.
- get_
a wrapper for retrieving data or accessing an API, or calculations form data. - impute_
imputation functions.
- calc_
Calculate from common equations.
Main features
Find out more
For more information see pkgdown website epiphytoolR