Allin, you are my hero!
I hope it wasn’t too hard to do, just to fulfill my wish.
I tried and it work like a charm!
I can’t thank you enough for this.
Without this, if I discover an error in the model I did, I would have to redo the last
part manually for all the students.
Now it is only a click of the button after I made the corrections.
The power of gretl just getting better and better.
Best,
Fred
Date: Tue, 31 May 2022 19:04:39 -0400
From: "Cottrell, Allin" <cottrell(a)wfu.edu>
Subject: [Gretl-users] Re: Helps on a more efficient script without
loops, plus a wish to save .gretl dataset from a scrip
To: Gretl list <gretl-users(a)gretlml.univpm.it>
Message-ID:
<CA+BOgOBr4CY2UibWAqYcoDoyLYous-J_yi-ZPmhczVnbD1+zaw(a)mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"
On Mon, May 30, 2022 at 9:19 PM Fred Engst <engst.uibe(a)gmail.com> wrote:
> As you can see, the way I’m using gretl, I need to send my students a .gretl dataset
with all the models and perhaps graphs. As is, I need to save each dataset manually, and
it is a bit time consuming when there are more than just a few students. I wish I can do
this through a script, perhaps using gretlcli to do that, if any of you can suggest a
way.
You're talking about a gretl session file, not just a dataset (which
is easily saved via script using either the GUI program or gretlcli,
using the "store" command).
Saving a session file via gretlcli is inherently impossible since that
program has no notion of a "session", no named models or graphs.
However, saving a session file via the command-line (script or
console) in the GUI program, while it has not been possible before, is
now implemented in git and snapshots. You use the "store" command,
giving the name of the file to be saved the suffix ".gretl", as in
store session01.gretl
Note, though, that you cannot specify a list of series to save (as in
standard "store" usage) -- or if you do, the effect is to save a gretl
dataset (in the strict sense). with ".gdt" appended to whatever
filename was given. There's no provision in session-saving to subset
the existing series, though of course you can achieve that effect by
deleting some series before doing the save.
Here's a trivial example of the new usage:
<hansl>
open data4-1
m1 <- ols 1 0 2
g1 <- gnuplot price sqft
store mysession.gretl
</hansl>
Allin
------------------------------