[datatable-help] How to aggregate one data.frame based on other time data frame time index?

waw wuletawu979 at yahoo.com
Wed Jan 20 13:48:07 CET 2016


Dear lists, I have two data frame, data.frame1<-data.frame(date=c(2010-01-01,
2010-01-02, 2010-01-03, 2010-01-04, 2010-01-05,2010-01-06,2010-01-07),
A=c(0.5,10,15,3,10,20,12) ,
B=c(1.5,1,1.5,3.2,10.5,9,12))data.frame2<-data.frame(date=c(2010-01-03,
2010-01-07), A=c(25.5,45) , B=c(4,34.7))Now I would like to compare them.
But before, I have to have the same length of rows. Data.frame2 is
aggregated values of data.frame1. However, the time interval is irregular.
Could you help me how to do this? thanks ! 



--
View this message in context: http://r.789695.n4.nabble.com/How-to-aggregate-one-data-frame-based-on-other-time-data-frame-time-index-tp4716598.html
Sent from the datatable-help mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/datatable-help/attachments/20160120/d07df7f8/attachment.html>


More information about the datatable-help mailing list