Another Way to Get a Subset of a Dataset

Learn about another way to get a subset of a dataset.

Is there another way to get a subset of a dataset?

Earlier, we showed how to use indexing to rows and columns as a way to select observations and variables in order to obtain a subset of pwt7. Another way to do this is to use the subset() function. Below is an example of using both indexing and subset to produce the same subset of pwt7.

Get hands-on with 1400+ tech skills courses.