Learn R Programming

EpiPvr (version 0.0.1)

gen_exp: Safely generate random exponential data

Description

A helper function only needed within AP_insect_simulator that generates random numbers from an exponential distribution using the base/stats R function stats::runif. This function simulates a set of random numbers with a fixed rate safely (ie for different input cases stemming from virus types).

Usage

gen_exp(n, rin, virusType)

Value

Numeric vector: n random exponential number.

Arguments

n

Numeric: number of points to sample.

rin

Numeric: event rate.

virusType

Character: SPT or PT plant virus type.