On Mar 16, 2021, at 8:01 PM, Avi Gross via R-help <r-help at r-project.org> wrote:
Here is an example that worked for me doing roughly what I mentioned but
note my names changed. It makes two plots.
library (ggplot2)
myDat <- read.table(text =
"datetimeraw
2021-03-12 05:16:46
2021-03-12 09:17:02
2021-03-12 13:31:43
2021-03-12 22:00:32
2021-03-13 09:21:43
2021-03-13 13:51:12
2021-03-13 18:03:13
2021-03-13 22:20:28
2021-03-14 08:59:03
2021-03-14 13:15:56
2021-03-14 17:25:23
2021-03-14 21:36:26",
sep = ",", header = TRUE)
head(myDat)
myDat$datetime <- as.POSIXct(myDat$datetimeraw, tz = "", format ="%Y-%M-%d
%H:%M:%OS")
myDat$date <- factor(format(myDat$datetime, "%Y-%m-%d"))
myDat$time <- format(myDat$datetime, "%H:%M")
myDat$seq <- factor(rep(1:4, 3))
# just dots
ggplot(data=myDat,aes(x=date, y=time)) + geom_point(aes(color=seq))
# Also text
ggplot(data=myDat,aes(x=date, y=time, label=time)) +
geom_point(aes(color=seq)) +
geom_text(aes(color=seq))