Chapter 3. Working with Your Data

 

“Contrariwise,” continued Tweedledee,” if it was so, it might be; and if it were so, it would be; but as it isn’t, it ain’t. That’s logic.”

 
 --LEWIS CARROLL

From Alice Through the Looking Glass by Lewis Carroll. Public domain.

3.1

Creating and Redefining Variables

76

3.2

Using SAS Functions

78

3.3

Selected SAS Functions

80

3.4

Using IF-THEN Statements

82

3.5

Grouping Observations with IF-THEN/ELSE Statements

84

3.6

Subsetting Your Data

86

3.7

Working with SAS Dates

88

3.8

Selected Date Informats, Functions, and Formats

90

3.9

Using the RETAIN and Sum Statements

92

3.10

Simplifying Programs with Arrays

94

3.11

Using Shortcuts for Lists of Variable Names

96

Creating and Redefining Variables

If someone were to compile a list of the most popular things ...

Get The Little SAS® Book: A Primer, Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.