[Gretl-users] Case (in)sensitivity
bhh at xs4all.nl
Wed Apr 15 15:17:55 EDT 2009
Een poging tot antwoord
On 11-04-2009, at 23:10, Riccardo (Jack) Lucchetti wrote:
> On Sat, 11 Apr 2009, Berend Hasselman wrote:
>> I have noticed that Finding variables does a case insensitive find.
>> However in genr variable names appear to be case sensitive.
>> I feel that it is not good practice to use case for distinguishing
>> between variables.
>> I prefer mY and MY to refer to the same entity and to use case for
>> purely textual purposes.
>> When importing data, one may not always have control over the case
>> of variable names.
>> So I would like to request
>> - an option to change the case of all variable names (lower and
>> - (and/or) for variable names to be treated case insensitively.
> I don't mean at all to be confrontational here, but I feel exactly
> the opposite way. In my eyes, the only reason why most people think
> of uppercase/lowercase characters as perfect substitutes is 25 years
> of brainwashing by a rudimentary operating system that I won't
User programs are not equivalent to filesystems of operating systems.
There are perfectly good reasons to have case insensitivity and that
has nothing to do with brainwashing or being brainwashed. I have more
than 30 years experience with all sorts of operating systems and
programming languages, case sensitive and case insensitive.
User friendliness. Less room for errors.
Also it is not consistent if Find searches case insensitively when
variable names are case sensitive.
Then looking for mV will be equivalent to looking for MV but in fact
these are separate entities.
This is bound to result in errors.
But when you have 15 spreadsheets with a total in excess of 3600
timeseries the names of which are all in uppercase AND
you want to convert them to lowercase names, then it is perfectly
reasonable to desire some options to quickly convert the names to
lowercase (or vice versa should it be required).
For example --tolower, --toupper options to rename.
Or string functions tolower and toupper.
You can then rename your variables with a loop within Gretl.
BTW: I realise that you can do this with external programs but that is
more work and seems like cracking a nut with a sledgehammer.
More information about the Gretl-users