I got it here , so I have the data in a slightly different form, but with lubridate you can also easily parse your data format.
library(tibble)
library(dplyr)
library(lubridate)
tbl <- tribble(
~TIME, ~MEASURE,
"2018-01-01 06:58:50", 05,
"2018-01-01 07:00:00", 10,
"2018-01-01 07:04:45", 20,
"2018-01-01 07:04:55", 25,
"2018-01-01 07:21:00", 20,
"2018-01-01 07:58:04", 18,
"2018-01-01 07:59:59", 12,
"2018-01-01 08:00:00", 17,
"2018-01-01 08:01:04", 30
) %>% mutate(TIME = ymd_hms(TIME))
With data in a form in which you can manipulate the date / time, you can sum it up per day + hour or only per hour for all dates:
tbl %>%
mutate(date = date(TIME), hour = hour(TIME)) %>%
group_by(date, hour) %>% summarise(m = mean(MEASURE))
tbl %>%
mutate(hour = hour(TIME)) %>%
group_by(hour) %>% summarise(m = mean(MEASURE))
To build it using dots and lines using ggplot2, you can do
library(ggplot2)
tbl %>%
mutate(hour = hour(TIME)) %>%
group_by(hour) %>% summarise(m = mean(MEASURE)) %>%
ggplot(aes(x = hour, y = m)) + geom_point() + geom_line()