Converts a string or character matrix to lowercase.
x (string or NxK matrix) – data to be converted to lowercase
y (string or NxK matrix) – which contains the lowercase equivalent of the data in x.
x = "MATH 401"; y = lower(x); print y;
lower() function can be useful when performing case insensitive string comparisons.
If you have a program that runs different code depending upon the variable name in a GAUSS dataset
or spreadsheet file, you or your colleagues may want to analyze data with inconsistent use of case.
var1 = "Consumption"; if lower(var1) == "gdp"; // code for gdp branch else if lower(var1) == "consumption"; // code for consumption branch endif;
lower() function, the code above will operate correctly whether var1 is
If x is a numeric matrix, y will contain garbage. No error message will be generated since GAUSS does not distinguish between numeric and character data in matrices.