I have a daily time series and have two questions to get some help with.

Firs,t I have dates in simple numeric values. e.g.
ymd
[1] 20050104 20050105 20050106 20050107 20050110 20050111 20050113 20050114
 [9] 20050118 20050120 20050121 20050124 20050125 20050126 20050127 20050128
[17] 20050201 20050202 20050203 20050204
Now, I'd like to compute statistics, e.g. acf, by business days. So, I try
to convert it into timeDate class. But, when I try to change date format,
this is what I am getting:
> tt = timeDate('20050101',format=c('%Y%m%d'),FinCenter='GMT')
> unclass(tt)
list()
attr(,"Data")
[1] "2005-01-01"
attr(,"Dim")
[1] 1
attr(,"format")
[1] "%Y-%m-%d"
attr(,"FinCenter")
[1] "GMT"
Somehow, I can't change the format to 'yyyymmdd' (e.g. 19950401)

Also, I was wondering if there is a function similar to 'timeRelative'
in Splus. So that actually I can add or substract n business days to and
from timeDate.

Or, is there a simpler way to compute statistics for daily time series?
( based on business days )

Thanks a lot

        [[alternative HTML version deleted]]

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to