On Thu, 14 Sep 2017, oleg_komashko(a)ukr.net wrote:
[...]
As for me, the most tedious thing
with Main/Tools/Start GNU R
are time series
In this case class(gretldata)->"mts"
That's why I never use Tools/Start GNU R
with time series: instead I run the following
R script from gretl
<R
# choose interactive R session
if (any(class(gretldata)!="data.frame"))
{mts2frame2<-function(x)
{ddd<-data.frame(x);
if (length(class(x))>1)
{m<-ncol(x);for (i in 1:m)
ddd[,i]<-ts(ddd[,i],start=start(x),frequency=frequency(x))}
else
ddd[,1]<-ts(ddd[,1],start=start(x),frequency=frequency(x));
ddd};
gretldata<-mts2frame2(gretldata)}
# make native gretl variables names searcheable
attach(gretldata)
R>
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.
If so, we could easily revise our R-data exporter to do just that
for time series datasets.
Allin