Subsets can be created using either inclusion or exclusion criteria. For instructions on how to drop or keep variables from a dataset, see our Data Step tutorial. Note: A related task is to select a subset of variables (columns) from a dataset. The difference between the two processes is in how the cases are selected. Both processes create new datasets by pulling information out of an existing dataset based on certain criteria. When splitting a dataset, you will have two or more datasets as a result.īoth subsetting and splitting are performed within a data step, and both make use of conditional logic. When subsetting a dataset, you will only have a single new dataset as a result.Ī split acts as a partition of a dataset: it separates the cases in a dataset into two or more new datasets. You can also think of this as "filtering" a dataset so that only some cases are included. In this tutorial, we use the following terms to refer to these two tasks:Ī subset is selection of cases taken from a dataset that match certain criteria. When preparing data for analysis, you may need to "filter out" cases (rows) from your dataset, or you may need to divide a dataset into separate pieces.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |