 Okay, welcome back. In today's lesson, we're going to be talking about creating objects in R. We're going to talk about different data types that are recognized in R and also get into some early functions for data manipulation, reorganization, talk about how data, how missing data is handled in R, and several other things. So let's go ahead and get started. Okay, back in our RStudio environment, we're going to start by creating a new label here. We're just going to call this one, creating objects. Now, objects in R, you can think of these just as variables. It's going to be interchangeable for the purposes of this lesson. These are things that are actually stored in R, kind of long term. They're going to show up here in our global environment as we create them. And they're just ways to store values. Okay, so you might think that, you know, if you wanted to create the output, for instance, of a simple mathematical operation, we can do this without creating any variables, and it's just going to give us an output. And that's nice. It's a calculator, and obviously R is a pretty sophisticated calculator as far as that goes. But we can't do anything really interesting with these values just like this. So the way to actually be able to use these values in kind of more sophisticated calculations, what we want to do is store them inside an object. And the way that we do that is with an assignment operator. So I can give a name for this variable. I'm just going to call it var 1, variable 1. And then I'm going to use what's called an assignment operator in R. It's just a combination of the less than sign, followed by a minus sign or a hyphen, how do you think about it? And now I'm going to do the same calculation, 5 plus 3. And when I run this, you can see that the var 1 object is created, and stored in our global environment. Okay, the global environment is really useful for seeing, kind of keeping track of all the different objects that the variables we create, and also gives you kind of an overview of what their current value is. So if we go back and change those, or if we're having, running into some errors, things are behaving in ways that we're not expecting, this allows us to kind of get a quick view of what's going on there. A quick note here is that within R, you can also use the equal sign as an assignment operator. The reason we don't recommend this is just because it's easy to confuse the single equal sign with the double equal sign, which serves a completely different purpose. So just to kind of keep those things straight, not run into any kind of confusions, we recommend just sticking with the regular assignment operator that we've introduced here. Another quick note here is that when you're creating new variables, you want to follow some kind of best practices guidelines for choosing variable names. So one of those is just that you want your names to be descriptive and short. This is because you're going to be calling these things up, writing them over and over and over again. You do want to understand what you're creating that variable is, what the contents of that variable are. So kind of descriptive names are important, but you don't want it to be too long because then you're just going to be typing a lot. There are some other rules that you also need to observe. For instance, variables in R cannot begin with numbers. So var 1, where the number comes later, that's fine. But if I was to call this 1 bar, R would not accept that. And if you look at page, I guess it's 13 in the PDF, there's a longer list of naming conventions and best practices that we recommend that you guys take a look at and familiarize yourself with. Okay, let's continue with another example. I'm going to create a new variable here, which I'm going to call area hectares. And you'll see this is a good variable name because it's both short and descriptive. It's telling me that I'm storing here a measurement of area and hectares are my unit. And I'm going to give this the value of 1. As I run this, again, area hectares is going to appear in my global environment, just indicating that that's been created successfully. And none of that value is stored. I can actually use it in calculations. So if I was to, let's say I wanted to convert this value to an equivalent value in acres, I could multiply this by 2.47, the conversion rate, run that. And now the output there is going to appear in my console. And it's 1. Sorry, 1 times 2.47 gives me 2.47. So it's running that calculation. You can see, though, that it hasn't actually changed the value that's stored in that variable. This is an important point. Even though you are performing operations that involve this variable, the value of that variable is going to remain constant unless you reassign it using this assignment operator. So I can do the same thing here, reassigning it the value 2.5. And if I were to run this code, watch here in the global environment, as I run this, the value now has changed from 1 to 2.5. So now let's create a new variable, area acres, and we're going to kind of combine the two previous steps. So we're going to use the assignment variable or operator again, indicating that we want to store the value of this next calculation in that new variable. So we're just going to go ahead and copy over that previous line of code here. And when we run this, it's going to do that same operation, take the value of area hectares and multiply by 2.47. But this time it's going to actually store the output of that calculation in that new variable, area hectares. And when we do this, you can see that area acres has been created in our global environment is storing the output of that calculation. Nonetheless, again, the variable area hectares hasn't changed. It's still set at 2.5. You can see that in the console as I do this, the value of these calculations, the output of these calculations is not being printed. If you wanted to print this as you go, you can just add parentheses around this line. And then when you execute it, you'll not only get the variable being created, but you'll also print the output of that calculation in your console. So that's creating objects. If you want some more practice with the skill, go ahead and check out the exercise provided on page 15 of the PDF.