Hello,
I am learning how to use the new R-integration features for actual
productive work. Up front I must say this is a great feature! Some weeks
ago I have already played with producing graphics using R from gretl,
and now I am leveraging the spectral density functions in R (like
spec.pgram; BTW, in the longer term it would be nice to have some
spectral analysis functions in a time-series package like gretl, but
that's a different issue and it's precisely the nice R integration which
makes it less urgent).
Now, in the "Gretl and R" chapter in the user guide it says that for
time-series datasets you must do something like
lg <- gretldata[,"lg"]
to actually get named series in the R environment. This looks like a
very easy and useful thing to automate, so I'm wondering, why doesn't
gretl do something like that automatically? To put it differently, if
for example the gretl time-series dataset has variables named "var1"
through "var5", the automatically executed commands should be:
gretldata <- read.table("/home/jack/.gretl/Rdata.tmp", header=TRUE)
gretldata <- ts(gretldata, start=c(1949, 1), frequency = 12)
# up to here is what gretl does already
# now the proposed stuff:
var1 <- gretldata[,"var1"]
var2 <- gretldata[,"var2"]
var3 <- gretldata[,"var3"]
var4 <- gretldata[,"var4"]
var5 <- gretldata[,"var5"]
Looks straightforward to me, but maybe I'm missing something?
thanks,
sven
Show replies by date