The problem are the different numbers of spaces in your id
strings. Remove them:
thedat$id <- gsub(" ", "", thedat$id)
thedat <- thedat[order(thedat$time),]
It seems more sensible to use transform
instead of summarise
if you calculate the cummulative sum:
library(plyr)
ddply(thedat, .(id), transform,
answer = cumsum(x))
id time x answer
1 w08 2019-06-02 20:43:00 4.283333 4.283333
2 w11 2019-05-31 06:25:00 66.583330 66.583330
3 w11 2019-05-31 21:03:00 27.950000 94.533330
4 w12 2019-05-31 08:45:00 64.250000 64.250000
5 w12 2019-05-31 20:58:00 28.033330 92.283330
6 w12 2019-06-01 06:33:00 18.450000 110.733330
7 w12 2019-06-01 21:09:00 3.850000 114.583330
8 w24 2019-06-01 21:31:00 27.483333 27.483333
9 w24 2019-06-02 06:37:00 18.383333 45.866666
10 w24 2019-06-02 20:43:00 4.283333 50.149999
11 w3 2019-05-31 06:47:00 42.216667 42.216667
12 w3 2019-05-31 06:47:00 66.216670 108.433337
13 w3 2019-06-01 20:32:00 4.466667 112.900004
14 w3 2019-06-01 20:32:00 28.466670 141.366674
15 w45 2019-05-31 19:11:00 53.816670 53.816670