Am 09.07.2022 um 22:18 schrieb Cottrell, Allin:
On Thu, Jul 7, 2022 at 6:32 PM Sven Schreiber
<svetosch(a)gmx.net> wrote:
>
> attached is a minimal example file. There are two data columns (no
> observation column), and because the blank (space) is the column
> separator, the column headings are enclosed in double quotes at the source.
> (I did not make up this format.)
>
> Gretl imports the data alright, but kind of ignores the double quotes,
> treating the first two space-separated words as the names, which gives
> totally wrong headings after the first one.[...]
Gretl will handle double-quoted "data" strings OK, but the general
rule is that if the first line is supposed to contain variable names
(column headings) it must be reasonably sanitized, with the help of a
text editor if need be. Of course gretl identifiers cannot contain
spaces, and enclosing such illegal names in quotes doesn't help at
all. In fact, it seems to say, "Hey, I really want to use these
illegal names to identify the variables!"
The problem is that the variable names will end up all wrong. I believe
there are two separate issues here from the point of the user:
- One part is a missing feature. I knew that the names are not valid
identifiers, but I was kind of expecting/hoping that gretl would
mangle/sanitize those names, like I ended up doing manually. I believe I
remember that gretl is doing some mangling in other contexts, but I
don't know where exactly, right now.
- In any case, I agree that such a feature is not high priority. But I
believe there's also a bug present: The way gretl interprets this
datafile (space-separated) currently, the row with the variable names
has more columns than the observation rows. That should cause an error,
no? Again, the status-quo result is that the data is imported with
misleading names. (And if an actual name is a single word, it will end
up being assigned to the wrong data column.)
thanks
sven