Aggregating weekly (7 day) data to monthly in R
问题 I have data measured over a 7 day period. Part of the data looks as follows: start wk end wk X1 2/1/2004 2/7/2004 89 2/8/2004 2/14/2004 65 2/15/2004 2/21/2004 64 2/22/2004 2/28/2004 95 2/29/2004 3/6/2004 79 3/7/2004 3/13/2004 79 I want to convert this weekly (7 day) data into monthly data using weighted averages of X1. Notice that some of the 7 day X1 data will overlap from one month to the other (X1=79 for the period 2/29 to 3/6 of 2004). Specifically I would obtain the February 2004 monthly