The dplyr package includes special features with regard to selecting and filtering data from the dataset mentioned. We will focus on two functions that will help us to achieve this functionality:
- select()
- filter()
The dplyr package includes special features with regard to selecting and filtering data from the dataset mentioned. We will focus on two functions that will help us to achieve this functionality:
This function is used to choose the required display variables based on specific criteria.
The syntax for calling this function is as follows:
select(dataset, column1, column2, ...)
The implementation of the select() function with respect to our mpg dataset is as follows:
> mpgSubset <- select(mpg, manufacturer, model) > View(mpgSubset)
This subset will only include information relating to the manufacturer and model. We can remove and add our selection...