diff --git a/Rmd/make_basicReport.R b/Rmd/make_basicReport.R index c10725c4cfc9fe742bdc06822c5a2e0bf99eff7b..12e2ef9abbfbc92c0069a9d8bf3f7d216878e6c8 100644 --- a/Rmd/make_basicReport.R +++ b/Rmd/make_basicReport.R @@ -9,7 +9,8 @@ reqLibs <- c("data.table", # data munching "here", # here "lubridate", # dates and times "ggplot2", # plots - "skimr" # for skim + "skimr", # for skim + "bookdown" # for making reports (should also install knittr etc) ) # load them woRkflow::loadLibraries(reqLibs) @@ -41,7 +42,7 @@ makeGWPlot <- function(dt){ dt[, weekDay := lubridate::wday(rDateTime, label = TRUE)] # draw a megaplot for illustrative purposes p <- ggplot2::ggplot(dt, aes(x = rDateTime, - y = GENERATION/1000000, + y = GENERATION/1000, colour = weekDay)) + geom_point() + theme(legend.position = "bottom") + @@ -51,13 +52,13 @@ makeGWPlot <- function(dt){ return(p) } version <- 10 -makeReport <- function(f,version){ +makeReport <- function(f){ # default = html rmarkdown::render(input = paste0(here::here("Rmd", f),".Rmd"), # we love here:here() - it helps us find the .Rmd to use params = list(title = title, subtitle = subtitle, authors = authors), - output_file = paste0(here::here("docs", f),version,".html") # where the output goes + output_file = paste0(here::here("docs", f),".html") # where the output goes ) } diff --git a/howTo/otherResources.md b/howTo/otherResources.md index dc2ffe9f471fd13d28e84f7ace988c2a53ee88a0..b0a860594f736aea2ae67679c1804ec8b370796b 100644 --- a/howTo/otherResources.md +++ b/howTo/otherResources.md @@ -14,4 +14,14 @@ * we have written a [short guide](gitBranches.md) * [HappyGit](https://happygitwithr.com/fork-and-clone.html) gives you the details * [ohshitgit](https://ohshitgit.com/) may be required here too (but not if you've followed the instructions above) - * using [git(hub/lab) issues](https://guides.github.com/features/issues/) as a way to manage your project - just like we did for the [new ECCD website](https://git.soton.ac.uk/SERG/sergwebsite/-/issues) \ No newline at end of file + * using [git(hub/lab) issues](https://guides.github.com/features/issues/) as a way to manage your project - just like we did for the [new ECCD website](https://git.soton.ac.uk/SERG/sergwebsite/-/issues) + +Even more ... + + * on [naming files (tidyverse)](https://style.tidyverse.org/files.html) + * coding style, syntax etc. with [lintr](https://github.com/jimhester/lintr) + * set up projects as packages with help from [usethis](https://usethis.r-lib.org/) + * tools for reproducibility + * Is your project file reproducible? [fertile](https://github.com/baumer-lab/fertile) might help + * Or try [rrrpkg](https://github.com/ropensci/rrrpkg) to create a research compendium + \ No newline at end of file