Good Afternoon all,
I am new here in the Community, it's a pleasure, I hope you can help me with this little issue.
I have a matrix (CD) with date and number but not in a continuous series (just some days per year) and a vector (A) with the continuous series.
How to create a new matrix with all the date and the values correctly located depending by the date?
Example Result:
AD:
2000-1-1 0
2000-1-2 0
2000-1-3 34.13
2000-1-4 0
2000-1-5 125.3
2000-1-6 0
2000-1-7 0
2000-1-8 0
2000-1-9 0.54
A<- seq(as.Date("2000/1/1"), by = "day", length.out = 10)
colC <- c( "2000-1-3","2000-1-5","2000-1-9")
colD <- c(34.13,125.3,0.54)
CD <- data.frame(colC, colD)
AD <- data.frame(colA, #?????)
Thank You so much,
Andrea