On Thu, 3 Mar 2016, Schaff, Frederik wrote:
Hi there,
I have encountered two kinds of strange bugs with gretl 2015-10-16
x86_64 on Windows:
1.) Opening a file like the attached one with a "just launched"
gretl instance will result in automatically substituting the
string variables with IDs. However, starting gretl with a script
which opens the file with the --preserve option works fine. And,
after this was done first within the current gretl instance, if
one "selects" open from the menu, it works also as-if the
"preserve" option is turned on. Cost me a bit of time to get to
it...
2.) The same file as attached, opened such that the string
variables "name" from t1 to t3 are there. Then restrict the sample
such that "t2" is not included. The factorized boxplot will have
as x-tics t1 , t2. The same is true if you take the "--permanent"
option. This made me more of a headache until I got there ;)
Please try the current gretl snapshot. Some improvements have been
made since 2015 in the handling of string-valued series in the GUI.
The --preserve option should be irrelevant here, since if I
understand your experiment, there are no predefined objects to be
preserved or discarded in this case.
That said, your example.csv doesn't contain enough data for gretl to
be able to produce sensible boxplots. If I double up the data (add a
second copy of the values below the original) then I can see some
plots.
PS: Is there an easy way to pipe individual varnames for the
x-tics in a boxplot to gnuplot via the {} command? And, why can I
do something like "Values = (Values ==1 ? 10 : Values)" but not
"Name = (Name == 't1' ? 'uiui' : Name)"? Is there an
alternative
to do so which I am not aware of?
There's a rule in gretl (perhaps not always apt) that you cannot
assign new values to an entire string-valued series. However, you
can do something similar in a loop:
loop i=1..$nobs --quiet
if Name[i] == "t1"
Name[i] = "uiui"
endif
endloop
(Note that 'string' with single quotes is not allowable syntax in
gretl.)
Allin Cottrell