diff --git a/vignettes/07_reproducable_research.Rmd b/vignettes/07_reproducable_research.Rmd index d278826..bbc67ad 100644 --- a/vignettes/07_reproducable_research.Rmd +++ b/vignettes/07_reproducable_research.Rmd @@ -1,5 +1,5 @@ --- -title: "A Biostatistician's Introduction to Reproducible Research and Reporting" +title: "Introduction to Reproducible Research and Reporting" author: "Paul Stevenson" date: "`r format(Sys.time(), '%d %B %Y')`" output: @@ -18,6 +18,9 @@ vignette: > ```{r init, include = FALSE, echo = FALSE} library(biometrics) +library(knitr) + +source("assets/R/hooks.R") ``` @@ -32,19 +35,19 @@ library(biometrics)
-library('ProjectTemplate')
-load.project()
-
+>- 00-cleaner.R
- read in raw data and save in data
- - 01-main.R
- main script file
- - 99-helper.R
- custom functions to be read in at start of script
- - data.R
- How you can create a data dictionary in R!
+- 00-cleaner.R
- read in raw data and save in data
+- 01-main.R
- main script file
+- 99-helper.R
- custom functions to be read in at start of script
+- data.R
- How you can create a data dictionary in R!
## Other Directories
- - config
- - ProjectTemplate configuration files, e.g.:
- - Auto-munge
- - Auto-load packages
- - Auto-import cache/data
- - inst
- - Auto generated files used by some package-related functions
- - Vignettes
+- config
+ - ProjectTemplate configuration files, e.g.:
+ - Auto-munge
+ - Auto-load packages
+ - Auto-import cache/data
+- inst
+ - Auto generated files used by some package-related functions
+ - Vignettes
-## Other Possibilities
+## More Directory Ideas
-```{r, echo = F, out.extra = "class='centre'", out.width = "75%"}
-knitr::include_graphics(file.path("assets", "images", "github_logo.png"))
+```{r, echo = F, out.extra = "figure", out.width = "75%"}
+knitr::include_graphics(file.path("assets", "images", "07_github_logo.png"))
```
-```{r, echo = F, out.extra = "class='centre'", out.width = "75%"}
-knitr::include_graphics(file.path("assets", "images", "gitlab.png"))
+```{r, echo = F, out.extra = "figure", out.width = "75%"}
+knitr::include_graphics(file.path("assets", "images", "07_gitlab.png"))
```
-```{r, echo = F, out.extra = "class='centre'", out.width = "75%"}
-knitr::include_graphics(file.path("assets", "images", "logos__Bitbucket.png"))
+```{r, echo = F, out.extra = "figure", out.width = "75%"}
+knitr::include_graphics(file.path("assets", "images", "07_logos__Bitbucket.png"))
```
-```{r, echo = F, out.extra = "class='centre'", out.width = "75%"}
-knitr::include_graphics(file.path("assets", "images", "cran.png"))
+```{r, echo = F, out.extra = "figure", out.width = "75%"}
+knitr::include_graphics(file.path("assets", "images", "07_cran.png"))
```
@@ -279,21 +283,21 @@ knitr::include_graphics(file.path("assets", "images", "cran.png"))
## Coding Tips
- - Be consistent:
- - Values:
- - "day1" vs "day_1" vs "Day 1"
- - "5th May 1970" vs "01-05-1970" vs "05/01/1970" vs 1970/05/01
- - Variables:
- - FirstName
vs first_name
- - sex
vs female
- - Use variable names that a human can understand
- - Document/comment your code!
+- Be consistent:
+ - Values:
+ - "day1" vs "day_1" vs "Day 1"
+ - "5th May 1970" vs "01-05-1970" vs "05/01/1970" vs 1970/05/01
+ - Variables:
+ - FirstName
vs first_name
+ - sex
vs female
+- Use variable names that a human can understand
+- Document/comment your code!
## Useful Tools/Packages
- >- R Studio IDE
- >- Tidyverse - data wrangling and visualisation
- >- repmis: Miscellaneous Tools for Reproducible Research
- >- captioner: Store figure and table captions and print them later
- >- devtools
- >- Telethon Kids Biometrics package