[R] constructing a daily time series
R. Michael Weylandt
michael.weylandt at gmail.com
Thu Jul 25 23:58:54 CEST 2013
On Mon, Jul 22, 2013 at 11:17 PM, Pascal Oettli <kridox at ymail.com> wrote:
> Hello,
>
> ?zoo
>
> Regards,
> Pascal
>
>
> 2013/7/23 shanxiao <shanxiao at umail.iu.edu>
>
>> Dear all,
>>
>>
>>
>> I have a vector of observations through day, and based on it, I try to
>> construct a daily time series with the R function ts(), but it seems that
>> it
>> only enables to construct a weekly, monthly, quarterly and yearly time
>> series, does anyone know whether there is an option to build a daily time
>> series? Thanks.
>>
Like Pascal said, you probably want to use the zoo/xts time series
classes, but if you have reason to stick to ts() you can set the
frequency to 365. I've written on this list before that "frequency" is
a slightly subtle idea with time series (and you can find that post if
you're interested), but it's not hard-coded to anything in particular.
MW
More information about the R-help
mailing list