I want to illustrate mean sleep times per day grouped by different survey phases (T1, T2, T3). Here is an example of what my dataframe looks like:
structure(list(code = c("AJH27", "AJH27", "AJH27", "AJH27", "AJH27",
"AJH27"), slt = c("22:10:00", "21:22:00", "22:00:00", "21:50:00",
"20:55:00", "21:55:00"), day = c("Mi", "Do", "Fr", "Sa", "So",
"Mo"), tmp = c("T1", "T1", "T1", "T1", "T1", "T1")), row.names = c(NA,
-6L), class = c("tbl_df", "tbl", "data.frame"))
The orginal datasets consists the data of more than three observations. Now I want to create a line graph, with the days (Mo to So) on the x-axis showing the mean sleep time for each day of the survey phase (clock time on y-axis). This would include three different lines (colored by group).
I not very experienced using ggplot and I could not figure out how to build the graph I want.
EDIT:
This is what my graph looks like when I used your code @JonSpring