Hi again. We've shown you how your work as a data analyst can be done in different ways using different tools. That's true in this program, and it'll be just as true when you start your job. Operations and calculations are two concepts we've checked out before. Coming up, we'll go back to them and learn how to use operators in R for a range of tasks including calculations. An operator is one of the key components of a calculation. When we first talked about operators, we defined them as a symbol that names the type of operation or calculation to be performed in a formula. The same is true when we use operators in R code. So let's check out some of these operators in R. Imagine we've got our hands on some e-commerce sales data that we need to analyze. We'll learn how to use operators to complete calculations on the sales data and for some other tasks too. Throughout our analysis, we'll use variables that R will store so that we can reference them whenever we need to. We'll use assignment operators, which we worked with earlier to do this. Assignment operators are used to assign values to variables and vectors. If we've got a bunch of sales figures that we want to include in a vector, we can use an assignment operator to assign them to a variable. Here's an example. Now, whenever we want to use the sales figures, we just type the variable we assigned. Next, let's check out arithmetic operators. These operators are used to complete math calculations and they might seem familiar. Plus signs do addition on variables, and minus signs do subtraction. We use an asterisk to perform multiplication and a slash performs division. There's other arithmetic operators too, but these are enough to get you started. Let's try a calculation for our sales data in RStudio. Feel free to follow along on your own as we go through these steps. We'll complete our work in a script to make sure our calculations are saved. As an analyst developing code in R, you'll spend most of your time in scripts. When you save a script, you'll have a complete record of your work. You'll use the console mostly to show the results of your programming. Also, even though we're not doing a deep analysis here, it's still a good idea to save our work for easy access later if we need it. First, let's add a comment. After the hashtag, we'll type "our first calculations." We'll start by assigning sales figures from the first two quarters of the year to variables. Before we complete our first calculation, we'll assign it to a new variable, midyear underscore sales. Then we'll add our quarterly figures using the plus sign as our addition operator. Let's run it and get the total of our sales data. When we run code in a script, the return shows up in the console. This total's now assigned to the mid-year underscore sales variable. We can check this by typing in midyear underscore sales into the console and hitting Enter. You may notice that calculations in R work in a similar way to calculations in spreadsheets and SQL. It's helpful to make connections across the tools that you're working with. Let's do one more calculation using our total sales from the first two quarters, represented by midyear underscore sales. We'll multiply it by two, to get a general idea of total sales for the year. We'll use an asterisk as our arithmetic operator. You'll find there's other ways to perform these types of calculations. But these are great examples of how the operators work, both for calculations and other operations. For now, let's save our script so that we can use these same variables again if we need to do more work in our sales data. Just like in other formats, we simply click, "Save As", and then type a file name. Our file extension is automatically applied to our file name. We'll close our script. When we're ready for more sales data analysis, we can open it again using the File menu. There are other categories of operators that you'll learn about later. But knowing how assignment and arithmetic operators help you program calculations is a good place to start. We're definitely moving forward in R and RStudio. Let's keep it rolling by learning more about pipes, another great tool in R. See you soon.