On Fri, 15 Sep 2017, Sven Schreiber wrote:
Am 15.09.2017 um 07:09 schrieb Riccardo (Jack) Lucchetti:
> On Thu, 14 Sep 2017, Allin Cottrell wrote:
>> Is that the general opinion? That is, that R's multiple time series object
>> ("mts") is of no use and we're better creating a data frame and
copying
>> the time-series attributes across per series.
> Personally, I have a totally different opinion from Oleh's. I like the fact
> that we ship time-series data into R as a ts(), as opposed to a generic
> data frame.
>
> But, that said, I'm not a heavy R user, so I'd rather listen to more
> informed people than myself.
Yes, Oleh please explain what the advantages of your method are over ts/mts
or whatever it's called in R.
Well, one point in favor of Oleh's approach is that you can attach() a
data frame but not an "mts". So for example if you send our
denmark.gdt to R in Oleh's way you can refer to "LRM", "LRY" etc
by
name. As things stand, you can't. And you can't even say
"gretldata$LRM" ("$ operator is invalid for atomic vectors") although
you can refer to LRM as gretldata[,1].
You can turn an mts into a data frame if you like:
dfr <- data.frame(gretldata)
attach(dfr)
and then refer to "LRM", but annoyingly that loses the time-series
information. Oleh's trick is to make a data frame but then turn each
of its columns into a ts. Seems to me this is a workaround for
something that's kinda broken in R, but it works.
Allin