 This is a quick tip for using R in the tidyverse. The if-else and case-when functions instruct the R language to make conditional decisions. If-else is pretty straightforward and works well with the mutate function. Case-when works equally well with the mutate function and is used when you need multiple if-else statements. In this video series, I'll explain how to use the permap functions to iterate custom functions over data frames. The series will become progressively more fluent in data rendering examples, but here I'll show a building block tip of data wrangling for managing your data workflow. As always, see the video description for a link to the code in the GitHub repository. Alright, let's just dive right into an if-else example and then I'll show you a case when. For if-else, my goal is to mutate the variable skin color conditionally based on whether or not the value of the sex variable has the value none. If the value none is true for the sex variable, then I want to change the value of the skin color variable to powder-coded aluminum. Because in the context of the Star Wars data set, characters that have had the sex variable value of none are androids, therefore I want to give them a skin color of powder-coded aluminum. Else, I want to keep the skin color variable the same. In the case-when example, I want to mutate and assign a new variable, notes, with a value conditionally dependent on the value of the homeworld variable's value. Since there are multiple categorical values to the if condition, I'm using the case-when function. Note also that I'm using the filter function in combination with the base r percent in percent value-matching operator. This operator allows me to filter a variable based on a vector. If my filtering vector values are in my target vector, then the filter function returns a true, and only those variables are subset from the main table. For more advanced examples, stay tuned for later videos where I demonstrate regex, pivot longer, and iterate with custom functions, all as part of one case study.