Chapter 8: Formatting Variables, Recoding Variables, and Writing Programs287
8.5 What Goes and What Stays in a Data Set
You have used DATAsteps to read data into variables and to manipulate datasuch as
defining new variables. After you have finished these tasks, you might want to simplify
the data set by getting rid of extraneous variables. The options DROP and KEEPspecify
variables to be eliminated from or savedin a SAS dataset. In addition to eliminating
variables, you might wanttokeepobservations that satisfy some criteria.The statements
WHEREand IF enable you tospecify values of variables that you want to keepin a SAS
data ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.