Re: ts in R (again)

About this list Date view Thread view Subject view Author view Other groups

Subject: Re: ts in R (again)
From: Ross Ihaka (ihaka@stat.auckland.ac.nz)
Date: Tue 17 Aug 1999 - 06:49:07 EST


Message-ID: <19990817084907.A5910@stat1.stat.auckland.ac.nz>

On Fri, Aug 13, 1999 at 12:27:13AM +0100, Prof Brian D Ripley wrote:
> Two other things I would like opinions on:
>
> 1) Given multiple series, plot.ts plots them on a single y scale, and
> plot.mts uses separate plots with a common x. Each has disadvantages.
> Should we try to switch between the styles depending on the inputs,
> and if so how?

Genuine query: How do I do I get a simple lagged variable plot like

        plot(lag(x), x)
        lines(lowess(lag(x), x))

We don't seem to have any simple way of doing this. Do we need a special
function for this (with a panel function for effects like lowess/loess)?

> 2) I think the current R style of
>
> > y <- ts(1:120, end=10-1e-7,frequency=12)
> > y
> Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
> 0 NA 1 2 3 4 5 6 7 8 9 10 11
> 1 12 13 14 15 16 17 18 19 20 21 22 23
> 2 24 25 26 27 28 29 30 31 32 33 34 35
> 3 36 37 38 39 40 41 42 43 44 45 46 47
> 4 48 49 50 51 52 53 54 55 56 57 58 59
> 5 60 61 62 63 64 65 66 67 68 69 70 71
> 6 72 73 74 75 76 77 78 79 80 81 82 83
> 7 84 85 86 87 88 89 90 91 92 93 94 95
> 8 96 97 98 99 100 101 102 103 104 105 106 107
> 9 108 109 110 111 112 113 114 115 116 117 118 119
> 10 120 NA NA NA NA NA NA NA NA NA NA NA
>
> is confusing, not least as it is it impossible to distinguish NAs at the
> ends from NAs generated by printing. I had a variant in library ts that
> used format to get blanks. Should I make that the default?

Yes.

I'm a little bit worried about having libraries overide "base"
methods. For efficiency reasons it would be better to attach libraries
after the "base" libraries. That would mean that attempted overrides
would not work.

We can't attach libraries after "base" at present, but I would like to
make it the default behaviour (if politically possible). That makes it
important to get agreement of what the "right" basic methods are and to
get them into the base.

-- 
+----------------------------------------------------------------------+
| Ross Ihaka                         Email:  ihaka@stat.auckland.ac.nz |
| Department of Statistics           Phone:  (64-9) 373-7599 x 5054    |
| University of Auckland             Fax:    (64-9) 373-7018           |
| Private Bag 92019                                                    |
| Auckland, New Zealand                                                |
+----------------------------------------------------------------------+
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b25 : Tue 04 Jan 2000 - 14:16:07 EST