In this section, we will learn how to identify and change case. We will also look at case alignment functions.
Case conversion and alignment
LowCase, PropCase, and UpCase
Data needs to be formatted for presentation and this is where cell alignment and case conversion come in handy. First, we will look at lower, upper, and proper case conversion:
Data Case;
Set Cars;
Upper=UpCase(Make);
Proper=PropCase(Make);
Lower=LowCase(Upper);
Run;
This will give us the following output, showing the case conversion:
We have used the existing Cars dataset and created three new variables to showcase the use of case conversion. When we separate two words using an underscore or some other special character, SAS still treats it as a single string...