Hi all
I am trying to make a scatter/ line plot of data from 3 columns arranged like this.
ID Time Obs
1 0.5 2
1 1 20
1 1.5 40
2 0.5 1
2 1 5
2 1.5 7
The data has 28 Sample IDs in the "ID" column and each ID has 314 data points. I want to plot 28 line plots in the same graph with Time as the X axis and Obs as the Y- axis.
The following code has worked for me previously for small data sets
ggplot(data, aes(x = Time , y = Obs, color = ID, group = ID) +
geom_line()
but does not work now. It gives the following error
Error: Cannot add ggproto objects together. Did you forget to add this object to a ggplot object?
Is there any way I can plot this graph without rearranging the data ? Thanks so much