You have a dataset from which you want to extract a subset. For example, for a data
consisting of employee details, you want to create a subset of employees who are above 30 years
and who make salary less than 10,000. How will you execute this in R?
The salary dataframe be
denoted by the variable ‘age’ and the data is contained within the variable ‘employee_data’.
To create a subset of employees older than 30, we will make use of the filter() function as
filter(employee_data, age >30 1, salary < 10000)