使用R软件可以非常轻松地完成。以下是将每日数据转换为月度数据的代码
install.packages(c("zoo","hydroTSM") library(zoo) library(hydroTSM) data=read.csv("data.csv") data #data should contain 2 or more columns; 1st column should be date in #English (U.K.) format, 2nd and subsequent columns should be your daily data date Elecsavingscost 01-01-1984 18.8 02-01-1984 20.2 03-01-1984 19 04-01-1984 19.6 05-01-1984 21.8 06-01-1984 21.5 . . . 25-12-2014 13.6 26-12-2014 13.6 27-12-2014 16.2 28-12-2014 18.2 29-12-2014 16.7 30-12-2014 19.4 31-12-2014 18.5 x1 <- zooreg(data$Elecsavingscost, start = as.Date("1984-01-01")) ## Daily to monthly conversion Elecsavingscost_monthly<- daily2monthly(x1, FUN=sum, na.rm=TRUE) write.csv(Elecsavingscost_monthly,"Elecsavingscost_monthly.csv")