const_decay: exponential decay functions

Description Usage Arguments Value Examples

View source: R/decay_functions.R

Description

Constant decay rate function (const_decay(), case when betas=0) e^-a*t; decaying decay rate function (decaying_decay()) e^(-(a/b)*(1-e^(-b*t))). Functions are normalized so at t=0 the function is 1.

Usage

1
2
3

Arguments

t

time (in minutes)

a

alpha (in per time, thus in per minute when time is in minutes)

par

vector of length 2 containing alpha (par[1]) and beta (par[2]) values; alpha=initial decay rate, beta=decay of decay rate (both in per time, thus in per minute when time is in minutes)

Value

returns abundance after time t at alpha initial decay rate and beta decay of decay rate relative to an initial abundance of 1

Examples

1
2
const_decay(10,log(2)/10) ## returns 0.5
decaying_decay(10,c(log(2)/10,0.01)) ##returns 0.5170495

Example output

[1] 0.5
[1] 0.5170495

RNAdecay documentation built on Nov. 8, 2020, 5:52 p.m.