[Rd] data(lh) time serie parameters

Gabor Grothendieck ggrothendieck at gmail.com
Sun Mar 30 13:36:23 CEST 2008


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.



More information about the R-devel mailing list