diff --git a/impetusModel/impetusModel.Rmd b/impetusModel/impetusModel.Rmd index b3f72cdb32629d74888861135858ba2f20edd263..abc67ede96f89ff970e71df04bcf33b00bf0bb07 100644 --- a/impetusModel/impetusModel.Rmd +++ b/impetusModel/impetusModel.Rmd @@ -21,7 +21,7 @@ output: keep_md: yes toc: yes toc_depth: 4 -bibliography: ../bibliography.bib +bibliography: '`r paste0(here::here(), "/bibliography.bib")`' --- ```{r knitrSetUp, include=FALSE} knitr::opts_chunk$set(echo = TRUE) # echo code so reader can see what is happening @@ -35,7 +35,6 @@ knitr::opts_chunk$set(tidy = TRUE) # tidy up code in case echo = TRUE ```{r codeSetup, include=FALSE} # Housekeeping ---- -rm(list=ls(all=TRUE)) # remove all objects from workspace # Set start time ---- startTime <- proc.time() @@ -48,18 +47,9 @@ userName <- sysInfo[[7]] # default code location - needed to load functions & parameters correctly so # has to be run here and not in the functions file as we can't find the functions file without it! -# use Mikey Harper's code to work out where we are -# only problem with this is that if you print projLoc this will reveal the full path (including username) in any output document -mh_findParentDirectory <- function(Parent){ - directory <-getwd() - while(basename(directory) != Parent){ - directory <- dirname(directory) - - } -return(directory) -} - -projLoc <- mh_findParentDirectory("IMPETUS") +library(here) + +projLoc <- here::here() # Functions ---- print(paste0("Loading functions from ", projLoc,"/impetusFunctions.R")) @@ -202,9 +192,15 @@ The final data output consists of 1800 household records for each month of each # Construct historical consumption levels for each month ``` +# Add Water Efficiency uptake + +```{r Run WE Model, child = "addBaselineWE.Rmd"} +# Run water efficiency model +``` + # Drought Response Water Efficiency Model -```{r Run Drought Model, child = "applyDroughtWEmodel.Rmd"} +```{r Run Drought Model, child = "applyDroughtModel.Rmd"} # Run water efficiency model ```