From ggrothendieck at gmail.com  Sun Mar 30 13:36:23 2008
From: ggrothendieck at gmail.com (Gabor Grothendieck)
Date: Sun, 30 Mar 2008 07:36:23 -0400
Subject: [Rd] data(lh) time serie parameters
In-Reply-To: <p06002005c4150f9d2903@192.168.1.10>
References: <mailman.25.1206702006.15065.r-devel@r-project.org>
	<p06002005c4150f9d2903@192.168.1.10>
Message-ID: <971536df0803300436r6615feb2hc445b9e143edba14@mail.gmail.com>

On Sun, Mar 30, 2008 at 5:52 AM, Jean lobry
<lobry at biomserv.univ-lyon1.fr> wrote:
> Dear all,
>
> I'm confused by the time serie parameters in data(lh) :
>
> sueoka:~ lobry$ R --vanilla --quiet
> >  tsp(lh)
> [1]  1 48  1
>
> because documentation says:
>
> QUOTE
> A regular time series giving the luteinizing hormone in blood
> samples at 10 mins intervals from a human female, 48 samples.
> UNQUOTE
>
> So that I would expect the time serie to end at 480 minutes
> or 8 hours. Shouldn't we have something like:
>
> >  tsp(lh) <- c(10, 480, 0.1) # in Minutes
>
> or
>
> >  tsp(lh) <- c(1/6, 8, 6)    # in Hours

It seems they are using 10 minutes as the unit of measurement.
If you wish to change it to hours you might want to use this instead:

   lh.hr <- ts(lh, start = 0, frequency = 6)

so that

   cycle(lh.hr)

starts out at 1.



[Rd] data(lh) time serie parameters
Gabor Grothendieck