SCM

Forum: help

Monitor Forum | Start New Thread Start New Thread
Change intervals in apply.weekly [ Reply ]
By: Giuseppe Vittucci on 2010-12-06 14:26
[forum:3726]
In using apply.weekly() I realized that for the program the week starts from Tuesday.
So for instance, with a series like this:
Close
Close
2006-07-03 36666.00
2006-07-04 36738.00
2006-07-05 36207.00
2006-07-06 36534.00
2006-07-07 36434.00
2006-07-10 36588.00
2006-07-11 36210.00
2006-07-12 36298.00
2006-07-13 35774.00
2006-07-14 35445.00
2006-07-17 35286.00
2006-07-18 35183.00
...

Where 2006-07-03 was Monday.
With this command:

p <- apply.weekly(Close,first)

Here is the series computed:

[,1]
2006-07-03 36666.00
2006-07-10 36738.00
2006-07-17 36210.00
...

p <- apply.weekly(Close,mean)

[,1]
2006-07-03 36666.00
2006-07-10 36500.20
2006-07-17 35802.60
...

Is there any command to set the week starting from Monday?
Thanks

Thanks to:
Vienna University of Economics and Business Powered By FusionForge