Of course, there exists alpha- of this function (save_gdt())
And it will appear on crane with the next update
Also, run_grcli will pass back almost everything
a user wants, just indicating names which are the
same as in scrip gr_mod will output all $extractors
by default (now it eats only a dozen commands)
I want to make gdtb to pass more complex objects than
data.frames, R have several data downloading packages
also such packages as all series from M# competitions etc
Oleh
Am 15.02.2018 um 22:24 schrieb oleg_komashko@ukr.net:
> Dear All.
> Sometimes one needs to save R data,
> say 'data.frame', 'ts' or 'mts' object
> in .gdt formate from inside R session
> So, hopefully, the script below will be useful
> for some participants
>
> <R> #installation of the mentioned packages is required"
> library(Rgretl)
> library(fpp)#only as exemplary data set
>
> air <- window(ausair, start=1990)# ts for not dealing with large data
> sets as example
>
>
> gr.script <- "store \"/home/oleh/gretl/rair\""
> run_grcli(gr.script,data =air)
> <R>
Thanks Oleh. You are the author of Rgretl, right? And so I guess that
the run_grcli function/command was also done by you.
The example is already very easy, but perhaps it might be useful to have
an explicit wrapper for this. What I mean is that a new Rgretl function,
say 'store_gretl' or 'gretl.store', executes your example.
So the following would be equivalent to your example:
<R>
library(Rgretl)
... <define air data>...
store_gretl("/home/oleh/gretl/rair", data = air)
</R>
And perhaps the fname could even get a default? Perhaps something like
"$HOME/<dataname>.gdt". Or if the R session has already been started
from gretl, and thus the variable gretl.dotdir is defined in R, then
this could be used as the path.
Just a thought.
cheers,
sven
_______________________________________________
Gretl-devel mailing list
Gretl-devel@lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-devel