I have a data.frame like
WWH V1 V2 V3 Names
2018-01-01 0.3240454 0.4044979 0.6208009 a
2018-01-01 0.7240454 0.6044979 0.9208009 b
2018-01-01 0.6124702 0.9391351 0.1459288 c
2018-01-02 0.5754003 0.9088237 0.7105769 a
2018-01-02 0.6947945 0.1100394 0.4810563 b
2018-01-02 0.3207489 0.4254129 0.1989616 c
in which the resolution of Date-time is daily. I need to change the resolution of Date-time to half hourly. So basically I need to repeat each row 48 times for which all the columns stay consistent except the first column that will get half hourly time values for the same date
WWH V1 V2 V3 Names
2018-01-01 00:00:00 0.3240454 0.4044979 0.6208009 a
2018-01-01 00:30:00 0.3240454 0.4044979 0.6208009 a
2018-01-01 01:00:00 0.3240454 0.4044979 0.6208009 a
. . .
2018-01-02 21:30:00 0.3207489 0.4254129 0.1989616 c
2018-01-02 22:00:00 0.3207489 0.4254129 0.1989616 c
2018-01-02 22:30:00 0.3207489 0.4254129 0.1989616 c
2018-01-02 23:00:00 0.3207489 0.4254129 0.1989616 c
2018-01-02 23:30:00 0.3207489 0.4254129 0.1989616 c
here is reproducible code
WWH<-seq(as.POSIXlt("2018/1/1"), as.POSIXlt("2018/1/5"), "days")
Names<-c("a","b","c","d","e")
A1<- cbind("Date"=rep(WWH[1],5),as.data.frame(matrix(runif(15),5,3)),"Names"=Names)
A2<-cbind("Date"=rep(WWH[2],3),as.data.frame(matrix(runif(9),3,3)),"Names"=Names[1:3])
A3<-cbind("Date"=rep(WWH[3],2),as.data.frame(matrix(runif(2),2,3)),"Names"=Names[4:5])
df<-rbind(A1,A2,A3)