Message-ID: <CAAmySGNH+S-HEg4F3G5fqXGk8iiK7dYCuHBbMpHVS6TRiJ4WWg@mail.gmail.com>
Date: 2013-07-25T21:58:54Z
From: R. Michael Weylandt
Subject: constructing a daily time series
In-Reply-To: <CAAcyNCz7PjEsNC9oJ8eOOyF_+4aQGVTKNBis-_yt6m6xLNX68w@mail.gmail.com>
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