In this lesson, we will learn about two very useful operators that come very handy in data manipulation. The first one is, the pipe operator. This is one thing you cannot avoid learning about if you use any tidy verse package. When we need to perform many steps such as filtering rows, selecting columns and summarizing data at one go, pipe operator allows us to structure our code in a format that is exactly aligned with the way we would ask R to go and perform these activities. Let's say in our ities data, we want R to filter rows where operations is SALE and we want to select the columns cost and price. Using pipe operator, we can write the code in this way. Df, pipe operator, filter, the condition is operation type is equals to is equals to SALE, then pipe operator, then using command select, we select the columns cost and price. If you were to do this without using the pipe operator, you may do the same code in two ways. One, either create intermediate objects which is data filtered with rows first and then pass this intermediate data to your select function, such as shown below. So in df_1, I am keeping the intermediate object, which is just the filtered rows based on the operation type and then I am passing this df_1 as the input to my select function or you may use this complicated code. Then instead of the data argument, you will pass this entire function filter on df where operation type is equals to SALES and then you will use comma to specify your columns for the select function. The above code runs in the opposite direction to our thinking. The last function to execute is return first. That means, the select which was the last function to be executed, had to be written first in the above code. But in the piped code, the order in which we mention these functions was aligned with the order in which we wanted R to perform this. Pipe operator is very frequently used with tidyverse package functions. The reason is that the output returned by the pipe operator is always a dataframe. Does anything returned by the pipe operator is always an acceptable input to any other tidyverse function. The other one that I want to discuss in this is this percent in percent operator. Let's see how we can use the percent in percent operator in our filter operations. Let say we have the names of two Cashiers in the employees object below, Vincent and Rachael. Now, we want to filter our ities data which is saved in df object, we want to filter this for these two employees only. The way we will do that is, I will pass my dataframe df, then using the pipe operator as discussed, then in the filter command I would see CashierName, percent in percent employees. What essentially I'm asking R to do is look at all the elements in CashierName and see which one of them are in the employees list. The ones that are there in the employees list will be saved as true while the others will be false. That will specify the filtering condition for this command here. Now, it's important to understand that when you do df$CashierName, percent in percent employees, was is when you do employees percent in percent df$CashierName. Let's quickly see. When I do this, I get a long list of trues and false. When I reverse the order, I get only two values, both of them are true. So this code is testing whether the names available here, how many of them are available here, which of them are available here. We know both of them are here. So what comes first is checked in the second. So the number of trues and false that you will receive will be governed by what comes first before the percent in percent operator. Does you see the order matters? Hope you enjoyed this lesson on these two operators. You are going to use the pipe operator in all the future lessons in this course. Therefore, it may be a good idea to understand it well and practice it.