Here is a way.
Concatenate the current system date and Time, coerce to "POSIXct" and use this new, temp variable for the x-axis. Set the axis labels in a datetime layer.
The warnings are due to the small data set, loess complains about not having enough data points. Don't worry about it, it will work with bigger data.
library(dplyr, quietly = TRUE)
library(ggplot2, quietly = TRUE)
x <- '
Time day mean_valence n
23:59:00 19 0.0909090909 3
23:58:00 19 0.0589743590 3
23:57:00 19 0.49743590 3'
valence_hour <- read.table(textConnection(x), header = TRUE)
valence_hour %>%
mutate(Time = paste(Sys.Date(), Time),
Time = as.POSIXct(Time)) %>%
ggplot(aes(Time, mean_valence)) +
geom_point() +
geom_line()+
scale_x_datetime(
date_breaks = "1 mins",
date_labels = "%H:%M:%S"
) +
geom_smooth(formula = y ~ x, method = "loess")
#> Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
#> parametric, : span too small. fewer data values than degrees of freedom.
#> Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
#> parametric, : pseudoinverse used at 1.654e+09
#> Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
#> parametric, : neighborhood radius 60.6
#> Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
#> parametric, : reciprocal condition number 0
#> Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
#> parametric, : There are other near singularities as well. 3672.4
#> Warning in predLoess(object$y, object$x, newx = if
#> (is.null(newdata)) object$x else if (is.data.frame(newdata))
#> as.matrix(model.frame(delete.response(terms(object)), : span too small. fewer
#> data values than degrees of freedom.
#> Warning in predLoess(object$y, object$x, newx = if
#> (is.null(newdata)) object$x else if (is.data.frame(newdata))
#> as.matrix(model.frame(delete.response(terms(object)), : pseudoinverse used at
#> 1.654e+09
#> Warning in predLoess(object$y, object$x, newx = if
#> (is.null(newdata)) object$x else if (is.data.frame(newdata))
#> as.matrix(model.frame(delete.response(terms(object)), : neighborhood radius 60.6
#> Warning in predLoess(object$y, object$x, newx = if
#> (is.null(newdata)) object$x else if (is.data.frame(newdata))
#> as.matrix(model.frame(delete.response(terms(object)), : reciprocal condition
#> number 0
#> Warning in predLoess(object$y, object$x, newx = if
#> (is.null(newdata)) object$x else if (is.data.frame(newdata))
#> as.matrix(model.frame(delete.response(terms(object)), : There are other near
#> singularities as well. 3672.4
#> Warning in max(ids, na.rm = TRUE): no non-missing arguments to max; returning
#> -Inf

Created on 2022-05-30 by the reprex package (v2.0.1)