An R package that provides functions for undertaking epiphytotic modelling and simulation studies in R.
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.
This does not provide full epidemiological models. See the following R packages for flexible complete models:
not yet vetted
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
Create an issue on this repo.
- 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.
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 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.
This package provides common base level functions that can be used in modelling the spatial movement of splash and wind dispersed plant disease inoculum.
Estimating Daily Infection Values, AUDPC, ect.
Epidemiological models need clean consistent weather data, this package contains functions to provide clean interpolated data for models.
Future versions will look towards an international standard for weather data format.
For more information see pkgdown website epiphytoolR