This article describes how to remove cases (respondents) from the data set (raw data) using a filter. The example in this article contains the steps required to remove all respondents whose Location equals North from the data set.
- A Displayr document containing a data set.
- A filter variable.
- Select the name of your data set from the Data Sets tree.
- Go to the object inspector > Properties > GENERAL > Unique identifier and select a variable with unique values, or select [Use case number]. CAUTION: Displayr will use the ordering of the data set to identify observations. If your data might change, you should not choose "use case number" unless new observations will always be added to the end of the data set.
Select any variables in your Data Sets tree that you wish to view as raw data, and right-click > View in Data Editor.
Select your filter variable in the Filter drop-down so that all the rows selected by the filter will appear in green. Here, we have applied our North filter while showing our Location data:
Now right-click the row header of any row matching the filter and select Delete Row(s) Matching Filter to delete these cases from your data set.
- OPTIONAL: You can return deleted cases to your data set by going back to the Data Editor and right-clicking any row header > Undelete All Rows or clicking on the data set name in the Data Sets tree and clicking Restore deleted cases from the object inspector.