Displaying 2 results from an estimated 2 matches for "bydate".
Did you mean:
mydate
2023 Nov 03
1
Sum data according to date in sequence
...0496, 6.272414,
1.032782, 11.004884, 10.096824, 6.658797, 4.808874, 1.469384,
2.996239, 0.303222, 4.988339, 8.131804, 0.117156, 3.285669, 1.175608,
3.677487, 1.068393, 8.820755, 8.138583, 9.0575)),
row.names = c(NA, 20L), class = "data.frame")
# convert date from character to Date
byDate <- input |>
mutate(newdate = mdy(date)) |>
group_by(newdate) |>
summarise(total = sum(EnergykWh))
byDate
## # A tibble: 5 ? 2
## newdate total
## <date> <dbl>
## 1 2016-01-14 12.0
## 2 2016-01-15 32.6
## 3 2016-01-16 21.3
## 4 2016-01-17 22.9
## 5 2016-01-...
2023 Nov 03
2
Sum data according to date in sequence
Hi,
I tried this:
# extract date from the time stamp
dt1 <- cbind(as.Date(dt$EndDate, format="%m/%d/%Y"), dt$EnergykWh)
head(dt1)
colnames(dt1) <- c("date", "EnergykWh")
and
my dt1 becomes these, the dates are replace by numbers.
dt1 <- cbind(as.Date(dt$EndDate, format="%m/%d/%Y"), dt$EnergykWh)
dput(head(dt1))
colnames(dt1) <-