 Our next step in our an introduction in accessing data is entering data. So this is where you're typing it in manually. And I like to think of this as a version of ad hoc data, because under most circumstances, you would import a data set, but there are situations in which you need just a small amount of data right away and you can type it in this way. Now, there are many different methods that are available for this. There's something called the colon operator. There's Seq, which is for sequence. There's C, which is short for concatenate. There's scan and there's rep. And I'm going to show you how each of these work. I will also mention this little one, the less than and a dash. That is the assignment operator in R. Let's take a look at it in R, and I'll explain how all of it works. Just open up this script, and we'll give it a whirl. What we're going to do here is just begin with a little discussion of the assignment operator. The less than dash is used to assign values to a variable. So I called an assignment operator. Now a lot of other programs would use an equals sign, but we use this one that's like an arrow. And you read it as gets so x gets five. It can go in the other direction pointing to the right, that would be very unusual. And you can use an equals sign R knows what you mean. But those are generally considered poor form and that's not just arbitrary. If you look at the Google style guide for R, it's specific about that. In our studio, you have a shortcut for this. If you do option dash, it inserts the assignment operator and a space. So I'll come down here right now, do option dash. And there you see, so that's a nice little shortcut that you can use in our studio when you're doing your ad hoc data entry. Let's start by looking at the colon operator. And most of this you would have seen already. And what this means is you simply stick a colon between two numbers and it goes through them sequentially. So I'm doing x one is a variable that I'm creating. And then I have the assignment operator gets zero colon 10. And that means it gets the numbers zero through 10. And there they all are. I'm going to delete my colon operator that's waiting for me to do something here. Now if we want to go and descending order just put the higher number first. So I'll put 10 colon zero. There it goes the other way. Seq or sec is short for sequence. And it's a way of being a little more specific about what you want. Now if you want to we can call up the help on sequence, it's right over here for sequence generation. There's the information. And we can do ascending values. So sec 10 duplicates one through 10 doesn't start at zero starts at one. But you can also specify how much you want things to jump by. So if you want to count down in threes, you do 30 to zero by negative three means step down threes. We'll run that one. And because it's in parentheses, it'll both save it to the environment and it'll show it in the console right away. So those are ways of doing sequential numbers and that can be really helpful. Now if you want to enter an arbitrary collection of numbers in different order, you can use C that stands for concatenate. You can also think of it as combine or collect. We can call it the help on that one. There it is. And let's just take these numbers and use C to combine them into the data object x five. And we can pull it and there you see it just went right through an interesting one is scan and this is for entering data live. So we'll do scan here get some help on that one you can see it read data values. And this one takes a little bit of explanation, I'm going to create an object x six, then I'm feeding into it scan with opening and closing parentheses because I'm running that command. So here's what happens, I run that one. And then down here in the console, you see that it now has one and a colon. And I can just start typing numbers and after each one I hit enter. And I can type in however many I want. And then when you're done, just hit enter twice. And it reads them all. And if you want to see what's in there, come back up here and just call the name of that object. They're the numbers that I entered. And so there may be situations in which that makes it a lot easier to enter data, especially if you're using a 10 key. Now rep, you can guess is for repetition. We'll call the help on that one. Replicate elements. And here's what we're going to do, we're going to say x seven, we're going to repeat or replicate true. And we're going to do it five times. So x seven. And then if you want to see, there are our five truths all in row. If you want to repeat more than one value, it depends on how you think set things up a little bit. Here, I'm going to do replicate or repeat for true and false. But by doing it as a set where I'm doing the C can catnate to collect the set. What it's going to do is repeat that set in order five times. So true, false, true, false, true, false, and so on. That's fine. But if you want to do the first one five times, and then the second one five times, I mean, think of it as like collating on a photocopier. If you don't want it collated, you do each. And that's going to do true, true, true, true, false, false, false, false. And so these are various ways that you can set up data and get it in really for an ad hoc or an as needed analysis. And it's a way of checking how functions work as I've used in a lot of examples here. And you can explore some of its possibilities and see how you can use it in your own work.