summaryrefslogtreecommitdiff
path: root/conversion
diff options
context:
space:
mode:
Diffstat (limited to 'conversion')
-rw-r--r--conversion13
1 files changed, 13 insertions, 0 deletions
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)
+}