From 5bdaeca7deca9682afc37bf9e976ceef5e862e38 Mon Sep 17 00:00:00 2001 From: St33v Date: Thu, 16 May 2013 18:30:10 +1000 Subject: Update conversion added exponential conversion pair of equations. --- conversion | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/conversion b/conversion index fc8d107..bac5a34 100644 --- a/conversion +++ b/conversion @@ -16,3 +16,16 @@ f2c <- function(deg, sc='F', string=FALSE){ round(deg, 0), sc, round(res, 0), to) return(res) } + +########### Exponential growth functions ############################# + +####################################################################### +# convert growth rate ('interest rate' version) to doubling time +dblTime <- function(x) { + return(log(2)/log(1 + x)) +} +####################################################################### +# convert doubling time to 'interest rate' +intRate <- function(x) { + return((exp(log(2)/x))-1) +} -- cgit v1.3