Plotting data in R; error: default method not implemented for type ‘list’

I am trying to plot data in ggplot (I tried a CRAN version from github too), but I end up getting an error:

Error in is.finite(x) : default method not implemented for type 'list'

This is the code for the plot:

ggplot(SinglePatient, aes(x = Condition, y = new, fill = Session)) +
  stat_summary(fun.y = mean, geom = "bar", color = 'black', size = 1, position = "dodge") +
  stat_summary(fun.data = mean_se, geom ="errorbar", width = .1, size = 1, position = position_dodge(width=.9))+
  xlab("Condition") + ylab("Reaction time (ms)") +
  scale_y_continuous(expand = c(0,0)) +
  plot_theme

This is an example of data from the data.frame that I am using:

Patient  Session   Stimulus     Trial  Running[Trial]   Block   ACC     Side   Condition  Group  new.RT
7212      post      blue_color.jpg  14  Center2ExpTrialList 2   incorrect   L   Center2Exp  BrainHQ  251    
7212      post      brown_color.jpg 6   Center2ExpTrialList 2   correct     R   Center2Exp  BrainHQ  253
7212      post      blue_color.jpg  19  Center2ExpTrialList 2   correct     L   Center2Exp  BrainHQ  256
7212      post      brown_color.jpg 23  Center2ExpTrialList 12  correct     R   Center2Exp  BrainHQ  261    
7212      post      blue_color.jpg  18  Center2ExpTrialList 2   correct     L   Center2Exp  BrainHQ  267    

Any idea of what I need to change? Thank you so much for your time.

Leave a Comment

error code: 523