I have weekly time series data with year, month, day, and price variables.
The input data set for the weekly series takes the following form:
Year month day price
19908 20 119.1
19908 27 124.5
19909 3 124.2
19909 10
If I understand:
x.new - cbind('M.Y'=paste(month.abb[x$month], x$Year, sep=-), x[-3])
aggregate(list(Change=x.new$price),
list(M.Y=x.new[,M.Y], Year=x.new$Year,
Month=x.new$month), FUN=mean)
On 30/03/2008, Richard Saba [EMAIL PROTECTED]
Do you mean merge them into a two column series of price
for one column and change for another column? That is what
I will assume since the result was not illustrated.
Suggest you read the help files and the three
vignettes in the zoo package.
Also R News 4/1 has info on dates.
If you were
3 matches
Mail list logo