0
votes

I have a data frame with raw meter reading every 5 minutes. The file is in the format of CSV file.

this is the part of my data frame(it also contain missing values)

DateTime;ActivePower
01.11.2018,00:00:00;13731302000
01.11.2018,00:05:00;13731358000
01.11.2018,00:10:00;13731418000
01.11.2018,00:15:00;13731476000
01.11.2018,00:20:00;13731530000
01.11.2018,00:25:00;13731588000
01.11.2018,00:30:00;13731646000
01.11.2018,00:35:00;13731702000
01.11.2018,00:40:00;13731758000
01.11.2018,00:45:00;13731814000
01.11.2018,00:50:00;13731866000
01.11.2018,00:55:00;13731920000
01.11.2018,01:00:00;13731978000
01.11.2018,01:05:00;13732034000
01.11.2018,01:10:00;13732090000
01.11.2018,01:15:00;13732144000
01.11.2018,01:20:00;13732196000
01.11.2018,01:25:00;13732250000
01.11.2018,01:30:00;13732304000

I want mean/median/the standard deviation/min/max value for every 15 min timestamp and I want to plot these as a curve.

Is this is possible with R?

I have already tried various functions.

I was able to cut the data by 15 min initially, but that code is not running anymore.

aggregate() is not helping me as I don't want to aggregate.

I am learning R, but I am not able to find any solution for this. I am really stuck in this and need a solution for this so that I can proceed.

After this, I will need to cluster these results as well. So if someone could help with this, that would be a great help. Thank you in advance.

1
I have already tried various functions. Please show us. Showing your attempts is a must when asking questions. Also expected output is something we need in order to help.Sotos

1 Answers

1
votes

How about this:

library(dplyr)

summarised_data <- your_data_here %>% 
  group_by(quater_hr = cut(DateTime, "15 min")) %>%
  summarise(mean(ActivePower),
            median(ActivePower),
            max(ActivePower))

There's a couple more for you to complete :D