Browse Source

evaluate highspeed source code only once for the entire bookdown build

Lennart Wittkuhn 3 years ago
parent
commit
dca6b1dd8a

+ 7 - 2
code/highspeed-analysis-oddball.Rmd

@@ -12,12 +12,17 @@ if ( basename(here::here()) == "highspeed" ) {
 } else {
   path_root = here::here()
 }
-# source all relevant functions from the setup R script:
-source(file.path(path_root, "code", "highspeed-analysis-setup.R"))
 # create a list of participants to exclude based on behavioral performance:
 sub_exclude <- c("sub-24", "sub-31", "sub-37", "sub-40")
 ```
 
+The next step is only evaluated during manual execution:
+
+```{r, eval=FALSE}
+# source all relevant functions from the setup R script:
+source(file.path(path_root, "code", "highspeed-analysis-setup.R"))
+```
+
 ### Decoding accuracy
 
 #### Mean decoding accuracy

+ 7 - 2
code/highspeed-analysis-repetition.Rmd

@@ -14,12 +14,17 @@ if ( basename(here::here()) == "highspeed" ) {
 } else {
   path_root = here::here()
 }
-# source all relevant functions from the setup R script:
-source(file.path(path_root, "code", "highspeed-analysis-setup.R"))
 # create a list of participants to exclude based on behavioral performance:
 sub_exclude <- c("sub-24", "sub-31", "sub-37", "sub-40")
 ```
 
+The next step is only evaluated during manual execution:
+
+```{r, eval=FALSE}
+# source all relevant functions from the setup R script:
+source(file.path(path_root, "code", "highspeed-analysis-setup.R"))
+```
+
 #### Prepare events and decoding data
 
 We prepare the behavioral events data and the decoding data of repetition trials:

+ 7 - 2
code/highspeed-analysis-resting.Rmd

@@ -14,12 +14,17 @@ if ( basename(here::here()) == "highspeed" ) {
 } else {
   path_root = here::here()
 }
-# source all relevant functions from the setup R script:
-source(file.path(path_root, "code", "highspeed-analysis-setup.R"))
 # list of participants with chance performance on sequence and repetition trials:
 chance_performer = c("sub-24", "sub-31", "sub-37", "sub-40")
 ```
 
+The next step is only evaluated during manual execution:
+
+```{r, eval=FALSE}
+# source all relevant functions from the setup R script:
+source(file.path(path_root, "code", "highspeed-analysis-setup.R"))
+```
+
 #### Prepare sequence events data
 
 We select all events files for sequence trials when the stimuli were presented:

+ 7 - 1
code/highspeed-analysis-sequence.Rmd

@@ -15,13 +15,19 @@ if ( basename(here::here()) == "highspeed" ) {
   path_root = here::here()
 }
 # source all relevant functions from the setup R script:
-source(file.path(path_root, "code", "highspeed-analysis-setup.R"))
 load(file.path(path_root, "data", "tmp", "dt_periods.Rdata"))
 load(file.path(path_root, "data", "tmp", "dt_odd_seq_sim_diff.Rdata"))
 load(file.path(path_root, "data", "tmp", "dt_odd_seq_sim.Rdata"))
 sub_exclude <- c("sub-24", "sub-31", "sub-37", "sub-40")
 ```
 
+The next step is only evaluated during manual execution:
+
+```{r, eval=FALSE}
+# source all relevant functions from the setup R script:
+source(file.path(path_root, "code", "highspeed-analysis-setup.R"))
+```
+
 #### Data preparation
 
 We create a function to determine early and late zones of forward and backward periods: