https://github.com/cran/ReacTran
Revision e1d00078210e32e7c6be83abec96f24e1c50b5f9 authored by Karline Soetaert on 12 June 2013, 00:00:00 UTC, committed by Gabor Csardi on 12 June 2013, 00:00:00 UTC
1 parent 72984f1
Raw File
Tip revision: e1d00078210e32e7c6be83abec96f24e1c50b5f9 authored by Karline Soetaert on 12 June 2013, 00:00:00 UTC
version 1.4.1
Tip revision: e1d0007
properties.R
## =============================================================================
##
## Several useful properties to be used with setup.prop
##
## =============================================================================

## exponential decline

 p.exp <- function(x, y.0=1, y.inf=0.5, x.L=0, x.att=1)
       return(y.inf + (y.0-y.inf)*exp(-pmax(x-x.L,0)/x.att))

## linear decline

 p.lin <- function(x, y.0=1, y.inf=0.5, x.L=0, x.att=1)
        return(pmin(y.0,pmax(y.inf,y.0-(y.0-y.inf)*(x-x.L)/x.att)))

## sigmoid decline

 p.sig <- function(x, y.0=1, y.inf=0.5, x.L=0, x.att=1)
        return(y.inf + (y.0-y.inf)*exp(-(x-x.L)/(0.25*x.att))/(1+exp(-(x-x.L)/(0.25*x.att))))

back to top