From 6958b270e03192be8061d04e8ef18ab0ad7bdf53 Mon Sep 17 00:00:00 2001 From: Johannes Koch Date: Fri, 17 May 2024 10:26:05 +0200 Subject: [PATCH] Add new tool function --- R/toolGetUnitDollar.R | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 R/toolGetUnitDollar.R diff --git a/R/toolGetUnitDollar.R b/R/toolGetUnitDollar.R new file mode 100644 index 0000000..502cf8f --- /dev/null +++ b/R/toolGetUnitDollar.R @@ -0,0 +1,8 @@ +toolGetUnitDollar <- function(returnOnlyBase = FALSE, inPPPP = TRUE) { + base <- 2017 + if (returnOnlyBase) { + return(base) + } + pppOrMer <- if (inPPPP) " Int$PPP" else " US$MER" + paste0("constant ", base, pppOrMer) +}