I'm using ggplot2 with the faceting option to plot several results of a data.frame.
It's a data.frame with three factors :
I plot the results of one participants in one condition using the subset function and then I facet with ggplot. However, I was wondering if there was an easier solution in ggplot2?
Thanks for any help, I'm currently learning R and ggplot2.
It sounds like you're trying to ask how to set up a two-way facet. I'm going to guess that 'stimuli is your predictor variable.
One way is like this:
ggplot( mydata, aes( x = stimuli, y = my.response) +
facet_wrap( condition ~ participant) +
geom_line()
or
geom_point()