I want to visualize individual longitudinal data with a spaghetti plot using ggplot2.
My data looks like this:
ID task response timepoint
1 naming 15 1
1 naming 28 2
2 naming 8 1
2 naming 10 2
All variables except of "response" are factors.
I ran this code and got a plot with lines, that connect something, but not the datapoint of timepoint 1 and timepoint 2.
datal.diff %>%
ggplot(aes(timepoint,response, color = ID, group=1)) +
facet_grid(.~ task) +
geom_point() +
geom_line()
Thank you for any comments and ideas!