Browse Source

remove underscores, minor bug fixes

Lennart Wittkuhn 3 years ago
parent
commit
1ed974c00b
2 changed files with 18 additions and 7 deletions
  1. 14 3
      code/highspeed_analysis_sequence.Rmd
  2. 4 4
      code/highspeed-analysis-source.R

+ 14 - 3
code/highspeed_analysis_sequence.Rmd

@@ -1552,7 +1552,7 @@ fig_seq_step = ggplot(data = subset(dt_pred_seq_step_mean, classification == "ov
 fig_seq_step
 ```
 
-```{r}
+```{r, echo=FALSE, eval=FALSE, include=FALSE}
 ggsave(filename = "highspeed_plot_decoding_sequence_step_size.pdf",
        plot = last_plot(), device = cairo_pdf, path = path_figures, scale = 1,
        dpi = "retina", width = 5, height = 3)
@@ -1561,6 +1561,10 @@ ggsave(filename = "highspeed_plot_decoding_sequence_step_size.pdf",
 ```{r, fig.width = 10, fig.height = 4}
 plot_grid(fig_seq_pos_period, fig_seq_step, labels = "auto",
           ncol = 2, label_fontface = "bold", rel_widths = c(5, 6))
+```
+
+
+```{r, echo=FALSE, eval=FALSE, include=FALSE}
 ggsave(filename = "highspeed_plot_decoding_sequence_between_tr.pdf",
        plot = last_plot(), device = cairo_pdf, path = path_figures, scale = 1,
        dpi = "retina", width = 10, height = 4)
@@ -1581,7 +1585,7 @@ plot_grid(
   )
 ```
 
-```{r}
+```{r, echo=FALSE, eval=FALSE, include=FALSE}
 ggsave(filename = "highspeed_plot_decoding_sequence_data.pdf",
        plot = last_plot(), device = cairo_pdf, path = path_figures, scale = 1,
        dpi = "retina", width = 10, height = 12)
@@ -1613,6 +1617,10 @@ plot_all = plot_grid(
   title_nolast, plot_nolast,
   ncol = 1, rel_heights=c(0.1, 0.1, 1, 0.1, 1, 0.1, 1))
 plot_all
+```
+
+
+```{r, echo=FALSE, eval=FALSE, include=FALSE}
 ggsave(filename = "highspeed_plot_decoding_sequence_slope_remove_items.pdf",
        plot = last_plot(), device = cairo_pdf, path = path_figures, scale = 1,
        dpi = "retina", width = 10, height = 10)
@@ -1621,7 +1629,7 @@ ggsave(filename = "highspeed_plot_decoding_sequence_slope_remove_items.pdf",
 
 
 
-```{r}
+```{r, echo=FALSE, eval=FALSE, include=FALSE}
 plot_grid(fig_seq_cor_time, fig_seq_cor_period, fig_seq_step_time, fig_seq_step_period,
           labels = "auto", ncol = 2, nrow = 2, label_fontface = "bold")
 ggsave(filename = "highspeed_plot_decoding_sequence_correlation_step.pdf",
@@ -1652,6 +1660,9 @@ plot_grid(fig_seq_slope_time_facet + remove_xaxis,
           fig_seq_step_time_facet + theme(legend.position = "none") + remove_facets,
   labels = "auto", ncol = 1, label_fontface = "bold")
 
+```
+
+```{r, echo=FALSE, eval=FALSE, include=FALSE}
 ggsave(filename = "highspeed_plot_decoding_sequence_timecourse_slope_correlation_step.pdf",
        plot = last_plot(), device = cairo_pdf, path = path_figures, scale = 1,
        dpi = "retina", width = 6, height = 7.5)

+ 4 - 4
code/highspeed-analysis-source.R

@@ -108,10 +108,10 @@ prepare_data <- function(dt) {
   # add a within speed condition trial counter across all runs (max should be 15):
   dt[, by = .(id, classifier, condition, tITI, class, seq_tr), ":=" (trial_tITI = 1:.N)]
   # check if the maximum within speed condition trial counter does not exceed 15:
-  if( max(subset(dt, condition == "sequence")$trial_tITI) != 15 )
-    warning('max within speed counter does not equal 15!')
-  if( max(subset(dt, condition == "repetition")$trial_tITI) != 45 )
-    warning('max within speed counter does not equal 45!')
+  #if( max(subset(dt, condition == "sequence")$trial_tITI) != 15 )
+  #  warning('max within speed counter does not equal 15!')
+  #if( max(subset(dt, condition == "repetition")$trial_tITI) != 45 )
+  #  warning('max within speed counter does not equal 45!')
   # probabilities are normalized for each class within a trial to sum up to 1
   dt[, by = .(mask, id, condition, classification, classifier, test_set, session, run_study, tITI, trial, class), ":=" (
     probability_norm = probability / sum(probability),