 Yes? They have the reference part of the back side. Okay. Great. Excellent. Okay. So I guess we're going to start by looking at R, and I should say that, you know, this, I mean, I want this workshop to be very easy for you guys. So if you've got any questions or anything, any concerns, you know, you can stop me anytime. If there's something that's not clear, I'll explain it again. And we're going to play with R as we go along. So we're going to make sure first that R is installed and is running on your machine, and we can do all of the things before we move on. So can you make sure that R is started and you have it in front of you? If everything's working or seem to be working, if it's not, just raise your hand. Okay. You know, can you jump on it? Okay. So first we're going to go through R, and as I said, it's going to be fairly basic. So for those who really know R, and you know these basics, you know, just bear with me, we're going to move on to some more interesting stuff. If you don't know R and you feel lost, you know, I mean, this is, it's always very difficult to teach something that you know very well, because maybe what seemed really basic to me might not be that basic to you. So if you feel I'm moving too fast, you know, just tell me and we can make sure that you're on board. Any questions so far? No? Okay. So I'm going to start a little bit and I'm sure she'll catch up. So the first thing you can, you can see is that R is just a calculator, okay? So often in fact, you know, when I have to do simple calculations on my machine, you know, I'm looking for some things, I just launch R and I use R as my calculator. So what we're going to do, we're going to go and launch R and we're going to play a little bit with the few comments. So I should say that in the other folder that you have, probably it's a good thing that you put it somewhere, you can access it, maybe on your desktop, whatever, in that folder you have the slides and you also have a file called script.R maybe or something like that where there's all the R comments in it. So you can either copy and paste from the slides or you can copy and paste, probably that's better from the R file that's in the folder. So you probably downloaded a folder. No, I don't actually, I don't know. Michelle, did you put the folder online and okay, is that, do you know if people have downloaded that already or should we do it now? Okay, can you tell me where it is? Behind me, okay, good, good. Okay, so we're going to go right here and we're going to download all the files. Yes, what a show, do I have one or? Yes, you do. You probably sent it to me. Okay, good, so what we're going to do is that we're going to download, we're going to do that right away. There are three data sets we're going to use. The first one is a full cytometry data set. The second one is a gene expression data set. And the other one is a time series expression data set. So we're going to download these three data sets along with the script. Okay, and this is where we're going to have all the comments for art that we're going to use today and tomorrow. We're going to save that. So just put it on your desktop, it's probably the easiest place so that you're going to be able to access all the files very easily. This is going to be the hardest part of the workshop. Once this is done, it's going to be super easy. Okay, so we just go and download all the files. Are you good? Is that okay? Yeah, what does he say? So, if you cannot open the file, what you should do is launch R and in R, so I don't have windows. So it's probably going to be very different from you guys. But you can go into a file open and you're going to open the script that R. And R is going to know that it's an R file, so that should be okay. And if you have problems, just raise your hand. Yes, say that again. If you just get the screen for URL, that's the screen. Yeah, but I don't want to copy and paste some things. Okay, so you should be able to open a file like this, and it comes in all the R commands we're going to use for this day. Is that okay for everyone? Okay, and you should have your R console open as well. And R is running here. And don't pay attention to the version number, so I have 2.10. Because we always need the latest version for what we do. But you should have 2.9, which is fine. Okay, for everyone, if it's not, just raise your hand. Okay, so we're going to try the first thing. So as I say, R is just a calculator, so we can just use it as such. So if you want to do two plus two, you can just copy and paste that. And of course, it's going to tell you it's four. You can actually play with it, do some other things, where it's just fine. There's also lots of mathematical functions that I built into R, like the exponential, okay? Also, as some built-in variables like pi, for example, you know, you often use pi in mathematics and statistics. So it's nice to have a variable that really contains the value of pi. So this is known to R. If you tap pi, it will be 3.14. There's also the sine and cosine functions, you know? So it's really just like a regular calculator that you've used before, and you're probably going to use it in the future again. Is this okay for everyone, this part? Tell you it's going to be really easy. Yes. You know, if something's not working for you, just let us know. I mean, there's no shame. Oh, you can. So yeah, I didn't do that. We can try. They do. So of course, so someone just asked, you know, in R is, you know, can you use parenthesis in brackets or whatever in the calculator? So of course, you can. So if you want to do 2 plus, so you know that there's an order that, you know, the multiplication is always going to be done before the addition and so forth. So if you do that, let's say 2 plus 3 times 4, it's going to be 14, right? But if you want to do 2 plus 4 first, then of course you're going to put parenthesis, and therefore it's going to do 2 plus 4 and then multiply that by 3, okay? So you can use parenthesis if you want to. Just like a regular calculator. Just like you would do it, you know, if you were to do that on a piece of paper. Okay, so we're going to wait a couple more minutes. So the next thing we're going to see is that in R, often you don't really know what you're looking for, or you know you want to do something like you want to use the sine function or the cosine function, but you don't actually know the exact R command or how to use it. What are the arguments of that function? Okay, so the first thing you're going to look for is for help. Okay, and there's a really nice built-in help in R. You know, so it's very, very straightforward to find information about something you don't know, and for me, every day I use the help command, because you cannot remember everything and how to use all of the built-in functions. So the way you can do that, okay, is just by typing help and the name of the command or the variable or the function you want to know more about. Okay, you can either do help and parenthesis with the name of the function variable you're looking for, or you can also do question mark, which is the same thing. So if we go back in R, we can do help, okay, and that's going to tell me everything about the exponential and the log and how to use them. Okay, and the good thing as well is that it's going to give me a couple of examples at the end. So if you scroll down towards the end, there's going to be a few examples. Typically, the examples are probably the best place you want to look at when you don't really know how to use something, because you're going to understand right away how to use it. Okay, so here there's an example of x of 3, and of course, you know, that's going to be 3. So that's nice, and we can also type, you know, question mark if we want, that's going to give us the exact same thing. Okay, so it's kind of a shortcut for help. You can do the same thing with sign, great, okay. But let's say I want to, I don't know, maybe you want to type something, let's say we wanted to look for the sign function, but we didn't read on what it was, so we would type or exponential, okay. Sometimes you will, if you type a word, you might not really find something for it, right? Because this might not be the actual R command that you need. So the other thing that you can do is that, so I think I have an example in here, the thing you can do is use help.search. So help.search will actually search for a keyword or something that might not be exactly in our function or in our variable or in our command. But it will find all, it will actually try to look for all the help it can find that contains that keyword, okay. So typically this is actually easier to use that if you're looking for something you're unsure is actually in our function or in our variable, okay. So if you were just used to type trigonometry and question mark, no there's nothing about it, right. Because there's no R functions or R variables. But if you do help.search, you will try to search something about it, okay. And it's gonna take a little bit longer because it's gonna try to look for a topic that actually contains that. And here it found one and you can just click on that and bang, you've got, here's this a cosine function, there's the sine function, there's the tangent, okay, and so forth. Is that sort of clear how to use that? So this is something that you're probably gonna use a lot and that you wanna make sure you understand how to use it. Okay, so one of the question here is why did I put quotes here but not before, for example, right, when we do help? It's because here we don't really know what we're looking for. So it's like a keyword, it's not really in our command. So when you put here help x, you're telling R that look for a command or variable that's exactly that name. Here it's gonna say, well, try to look for a topic that contains that keyword, okay. So something that you don't really know something you wanna know something about, you just type that keyword. It could be plot or matrix, whatever keyword that you wanna know something about. Okay, so far so good for everyone? So a calculator is very nice and you can just type a couple of comments and do some very basic calculation. But even on a very simple calculator, just like a tiny pocket calculator, you need a way to store intermediate results, right? Often you're gonna try to put a couple of things in memory so that you can reuse it later or you can make it easier to compute something. So we need a way to store variables in memory. And this is done via the assignment. We're gonna create some variable that are going to contain some value. And the assignment in R is done via that command, which is kind of like a left arrow. So we're gonna go back in the script. And this is an assignment, okay? So we're saying create a variable x and put the value two in x. The second one here says create a variable y and put the value two in y, and then we can just do x plus y. And R's gonna know that what we wanna do is two plus two because x contains two, y contains two, therefore we do two plus two. So let's try that. So let's first try to copy and paste it, okay? So x is in memory now. So if I type x, it's gonna know that its value is two. So we can do the same thing for y. And of course, once a variable is created, you can change its value if you want. You can say, no, I didn't want two, I want three, so you can do that. No, once you have overwritten value, you can go back to the previous one. It's over, okay? So you need to be careful when you store intermediate results. You have to reassign. So if you wanna say, no, it was due, you have to redo that, okay? So one thing that you're gonna, maybe not right away, but after you know a little bit more about R, you're gonna feel more confident on how to use it. And therefore, you're gonna start writing a little bit of code and things, and you're gonna create more variables and more intermediate variables. So you're gonna have lots of variables in your code, possibly. And so you might say x, y, z, a, b, whatever, you're gonna have lots of variables, and then you're gonna say, what is that variable used for? I don't even remember. So it's very, it's typically a good idea to give explicit names for your variable, right? So try to avoid the single later variable because it's hard to know what they are for and what they mean. So try to use maybe longer variable names. And one way to do that is to use an explicit name. So your favorite variable, and maybe you can separate the world with capital or dots or something like that. Is that okay for everyone? Are we okay in the back, Michelle? Sort of, okay. Okay, so of course here we've looked at creating variables, single numbers and calculation. But you all know that, and we've heard that this morning, is that when we want to do statistics and buy informatics, we're gonna have a lot more than just one data point, right? So we need to be able to store things that contain just one more than just one number, okay? So we need a way to store data sets and so forth. And we can do that via maybe vectors, sequences, and list. And we're gonna go through these things. So it's basically trying to use R as a way to work on data directly, data set directly. So one way you can do that, when you've got lots of elements, you can just concatenate these elements using the C function, okay? And we're gonna go through the example. So here's the example here. So I wanna create a variable that contains several numbers, okay? So what I'm doing is just concatenating these numbers using the C. So C for concatenate, and then you open the parenthesis, and you put all the numbers separated by a comma, and then you close up parenthesis, okay? So here we are just creating a vector or a list of numbers, okay? We do that, and we wanna look at it. You're gonna see that it contains several numbers. Of course it's a vector, maybe once you look at just one of the specific numbers in that list, maybe the first one, we can directly access that number using the brackets and you're saying, access the first element of that vector. Just copy and paste that, and that's going to give you the first number. If you want the second, you use that, and so forth. So doing what we're doing now, it's called indexing. So we can index a vector, and we're gonna learn more a little bit about indexing in a couple of slides. Is that okay for everyone? Indexing means you want to access a specific element of your vector, okay? So we're just indexing that element. And we're gonna learn more about indexing. There's a lot of ways you can index things. And this is a good thing about R and I would say programming languages in general. Okay, so let's say now we wanna create another vector. It's called height, okay? And let's say we wanna compute something that involves the height and the weight, and here's just the body mass index, okay? That we define at the weight divided by the height squared. And we can do that directly on the vector. So we can do operation on all the numbers at once. What this is going to do is that for each element of the vector, you're gonna do the exact same operation, okay? So we're gonna go through the example and you're going to understand that very easily. So we've got the weight vector, the height vector, and we're creating the body mass index variable of vector. By just dividing the weight, dividing by the height squared. So if we type that, it's gonna be this. And in fact, you can see that this, what this comment is doing is that it's working on vectors directly. And it's going to say, okay, for each element of that vector, and each element of that vector, I'm gonna do the weight divided by the height squared. So we could do that by hand manually, right? We could just do, let's try to take the first element, which is 60, and divide it by the first element of height squared. And that's going to give you the same thing here. You can do for the second element, we're indexing because I wanna show you that when you work on the vectors directly, it's the same thing as just working on each element individually, okay? And that's a great way because you don't have to do it by hand. R is just gonna work on the vector directly, and it's going to do that by just if you want looping over all the elements of the vector and doing the exact same calculation, okay? And so this is what we call vectorized operation, okay? That is, you're going to do an operation on the list, and it's gonna do the same operation on all the elements of that list, okay? And that's very important because when we deal with statistics or bioinformatics, we get lots of data, and we're suddenly not gonna do it by hand or try to write comment for each of the data point in the data set, right? We want to do things that are easy to use, that are fast, and are gonna work on the whole data set at once. It is sort of clear what we mean here by it's vectorized. It's gonna do the same operation on each element of the vector. If it's not clear, just raise your hand if there's something that you wanna know, you wanna ask a question, do it, there's no stupid question in reading. No, no, well, it's assuming that each element, first of all, it's assuming that the vector's at the same size, because if they don't, what do you mean by doing that operation, right? And that you wanna do, they're all or there's a pairing between the element of the vector. So each weight corresponds to the height in the other vector. So if you've got patients, for example, the first element of the weight is from patient one. The first element in the height is from patient one, patient two, and so forth. So ordering in that way, yes. Same number of elements, yes. Yeah, in fact, if they're not the same, r is sort of clever about it, well, clever yes and no. Because what it will do is it will take the shorter vector and it will do that operation on the shortest length of the two vectors. But you need to be a little bit careful about what you wanna do. Well, we can try, we try that. You know what, actually, well, let's try now. So we're gonna take the height, okay? And we're going to just remove the last element, for example, okay? And let's try to do the same thing again. So it's going to give you a warning here to tell you that they don't add the same length, but it's still going to do the calculation. In fact, if you look at EMI, you're gonna get something. So now one thing that you might say is that, well, it's weird because even though there's only five elements in the height, it's still giving me a number for the last one, okay? What r does is that when there's one of the vector that's shorter than the other, it's going to recycle the elements. So let's say here we do the operation for the six element. We did not have a height in here because we removed it for the six, let's say, patient. What it's going to do is it's gonna say, okay, I need one more element. So it's gonna go back and take the first one, okay? So it's going to recycle the elements. In any case, you don't have to worry too much about it because you do get the warning. You know you did something wrong. So you know that it's not valid and you should be careful about it. Well, I know because I know all works. Typically, no, and in the warning you wouldn't know. You just have to know all works. So it's just recycled. So if you've got two least, one that has ten elements, the other one has five. It needs more, so yeah, it's going to recycle them. So that's what I said about R is clever in a good and by the way, it's because it's still going to give you a result but it's not very meaningful. Good question. So can we know the length of a vector? So it's something probably I should have put here, but of course, we can just type length of the vector, okay? And that's going to tell us the length of it, okay? So here it's six, okay? One thing, so when you ask me a question, is there something to know the length of the vector before you ask that question? Try to find it on your own using the question mark, right? So it would be sort of a good test and you could see if you can actually learn information even though you didn't know about it. So here, let's say we did not know about that so we could just type, you know, the easiest way to do is to type length. In fact, here it is the name of the function. But if we did not know that, we could just do help that search. And the name of what we want, okay? And then it will look for a lot of things. So this is something that maybe would be interesting when you do help that search, is that it might actually return a lot of possible answers for you. But one of them, some of them are not going to be relevant. And the way it's going to solve these answers is that you're going to have a topic, you're going to have in which package it comes from, and you're going to have a description. Many of the packages, so here on my machine I have lots of packages installed. Probably on yours, you don't have that many packages, maybe you don't have any packages installed besides the base distribution. So typically what you would look for is first in the base distribution here, right, because this is what you care about. And here you can see that there's length and this is what we're looking for. So we'll go back to that later on. Well, so here let's say it did not, well, in that case, it does exist. But if we did not know, we could just do help that search and the name of what we're looking for, okay. And if it did not exist, maybe you would find something else that was related to length that would have a very similar name and you would see it, it would come up here, okay. So here it's not a very good example, but the trigonometry example I've used before, you could see that there was no function for trigonometry, but we still found what we were looking for, which is sine and cosine. Because sine plays. Doesn't have length. So. If you do question mark length, you don't get anything. And if I do length as a error, could not find a function well. I don't think that's good. How do you do, you must be using q instead of y. Good, good. You guys are learning, that's very good. I do that all the time too, so, okay. So we just learned how to concatenate elements with the c function and we can do vectorize operation. That is, we can just divide a vector by another vector and it's going to do the element-wise division, okay. One thing that you should know and we're going to come back to that later is that vector-based operation are very fast, okay. And there's other ways to actually do these operation by doing loops and things, we're going to talk a little bit about that, but typically it's going to be slower. Okay, so here's a little exercise for you. So try to find another way to create a vector. Okay, so let's say you want to create a vector. What would you do? Not using c or concatenate. If you know how to do it, don't say anything. But let's say you want to create a vector, what would you do? Okay, go for it. Question mark vector, all right. We're trying to look for a way to create a vector, so let's try to ask the helpful vector. Okay, so we can try to do that. Question mark vector. So here vector, there's a function called vector that produces a vector of the given length and mode. Okay, well, this might be a bit abstract. So what we're going to do is that we're going to go and scroll down to the example over here. So if we look in the example, we do look and find the c function. And there's some other things, but it's not really related to what we wanted to do, right? So now we type vector, we see c also c. So maybe this is more related to what we want to do. So we're going to click on this, because we know that this is the sort of things that we were looking for, so we click on the c. And that's going to give us some more information on perhaps how to create vectors. And right away you can see that maybe I didn't rethink of that example, because I don't really see what I was looking for. So this is, but it's a good example for something else in fact. Often you're going to try to look for things that are using the question mark or even help that search. So maybe let's try help that search, because here it's a way to create vector, but it's not really what I was looking for, because it's more abstract than the other thing I was looking for. So we're going to do help that search vector to try to see what we find here. So there's the c, okay, which allows us to do the concatenate. And we're going to go down, we're going to go down a little bit more. Yes, because you're using Windows, so maybe you have a different window or it might not look exactly the same. I don't, I do not know, let me see. So this is a great commercial for, you should get a Mac, eh? No, no, it's just a different GUI on Windows. So maybe it's not clickable. So for Christmas, you can just order a Mac and it will be clickable. In the meantime, you can just look at the specific comment. And so when you get a topic, so let's say, here's this rep, right? So you would see it, maybe it's not clickable, but you would see it. So what you can do when you have that, how does it call it? Once you have the R topic, you can do question mark rep, okay? Once you know what it is, you can just do question mark rep, and you will get the help for it. Okay, so maybe it's not clickable for you guys, but you should be able to just get the name and do question mark what you're looking for. Which we, it will do the exact same thing. We'll talk about packages soon, okay? But like this, when you see it, so in your case, it should be, there should be in the name of the package, which is base. And then you have rep after it, right? Whoever looks like that. Which tells you that rep is a function that's part of the base distribution of the core distribution of R. It's not very clear, we'll talk about packages. Is that okay for everyone how to go help on rep? Okay, so now it says that, so rep can replicate the value in X and it's a generic function basically to create vectors. So if we go to the help right away, we say, okay, here you do rep one, two, four, let's do actually something slightly easier. Okay, so let's look at the arguments. So the first one, it's a vector. So you can replicate a vector, it can just be a number. And the second argument is the number of times you want to replicate that. So let's just go in R, sorry. When you do question mark rep, so when you do, let me try again. If you do question mark rep like that, you get a, well, you would get a window, so close that one and redo it. Close that window and type question mark. You get it? Good, so if you type question mark rep and you still have the old window from vector, just close that window and do it again, it will open a new window with rep in it. Okay, so let's go back to this. So let's try to play with it so we can do rep. So we want to replicate two and ten times. Okay, that's going to create a vector of length two and it's going to just replicate two, ten times. Okay, so we're going to see more ways to create vectors later on. So this is just a little exercise to use help and try to find something. So while we talk about that, you're going to see that very often. You're going to look for something or come on. And it can be very easy to get lost in the health files of R, because there's a lot of functions sometimes. If you type a key word, it's not really going to give you what you want. And I'm going to be honest with you, probably most of the time I look for something or help on our topic, the best way to find it is via Google, okay? So you just type create a vector R in Google and it's probably going to give you better answers than what you would look by using the help. That's right, yeah. They get paid enough that they can actually do these sorts of things, yeah. Yeah, whereas the people who actually work on R are probably too poor to spend a lot of time on creating nice manual pages. Okay, so another thing that we didn't talk about is that C can be used to concatenate not only vectors, but string and letters, whatever you want. So we're going to see that through a couple of examples. So just to summarize vectors, we've got three ways of vectors. One we've seen, which is a numeric, is just going to be a list of numbers. Another one that's going to be logical, it's going to be a list of what we call Boolean variables, true or false. We're going to see an example of that. And we're going to have vectors of type characters, just going to be a list of strings. So let's go see a couple of examples of that. Okay, so here we create the vector, which is just numeric. And copy and paste that. If we type x, that's just three numbers. Now we want to create a vector of logical. So the first element is true, then it's true, then it's false, then it's true. These types of variable are called Booleans. It could be either true or false, or sometimes it's coded as 0, 1. And it's very helpful when you're trying to make a statistical decision or something to have search variables, okay? And another one is just putting a bunch of string of characters together, okay? And it's going to see that it's just a vector, but each element of the vector is a word. And again, there are vectors, so we can index, so we can access any of the element in the same way as before. So if we want the third element of the x vector, it's going to be name, okay? If you want the fifth element, it's going to be Francis, okay? So here it's a vector, so it's just we concatenate a bunch of, or we put together a bunch of strings, or in this case, they are just words. And we put them into a vector so that the first element is the word hello, the second one is mine, then third my name is, and so forth. And we're going to access any of these elements. Is that clear for everyone? So why do you need quotation marks? Good question. So if you don't, all we think that you're trying to manipulate a variable. So you need to make a difference between a string and a variable for R. So let's go back in R. If you type name, it's going to say error because object name is not found. If we do name two, okay? Create a variable that's called name, contains the value two. And then I can print that variable, it's two, okay? But then if you don't put quotes around name, how it's going to know that you want to use the word name or the variable name, okay? So you need to make a distinction between the two. So putting the quote is saying, I just want to use that as a string, that's name, another variable name. So it's different from the variable, okay? So for what to use, in fact, you could do that here, okay? Let's try to do that. We replace the word name by name. What is that going to do? It's going to use the variable, okay? So when you concatenate things that have different types, such as numbers and characters, the default will be to turn everything as characters or as strings. So in that case, name was just a numeric value two. But because you wanted to concatenate with other strings, it says, okay, let's convert that into a string. You can only add vectors of the same kind, either all strings, all characters, all Boolean. Say that again? You can. So we'll see that, but so here we've got x. The length of x is five, right? So what you could do, for example, is to do, okay, let's do x. But I want x and I want to add another number to it, 12. So what I'm going to do, I'm going to take x, concatenate 12 to it. And maybe I'm going to rename that and call it y. And this is going to be y. So with a concatenate, you can always add things to a vector already. Concatenate can normally concatenate numbers and strings together, but also vectors. We'll see that, yes. The answer is yes, which is why it's really nice, but we'll see it. Okay, okay, a little exercise for you. Create a vector with the following elements, 1, 3, 10, and minus 1. And call that vector x. So you're going to create a vector x, and I want the vector x to contain 1, 3, 10, and minus 1, okay? And if you don't manage to do that, there's no break for you. So of course, the answer is in the file, but let's try to do it on your own. Okay, so we want to create a vector, we want to name it x. So we start with x and the assignment. So the left arrow like that. We want to concatenate numbers, so we're going to start with the c, okay? And I can't remember what numbers I said, I said, what was it? 1, 3, 10, minus 1, so 1, 3, 10, and minus 1, okay? So if we have created that vector with 1, 3, 10, minus 1, here's x. Now we want to take the square root of x, this is what I asked you next. So take the square root of x. Do you think you're going to have some problems if you take the square root of x? Why? Because of the minus 1. Right? Because of the minus 1. And we cannot take the square root of negative numbers. But let's try anyway. Why? Yeah, because r is clever that, as I see, it's clever enough to do things even if sometimes you shouldn't. But it's going to give you a warning, okay? So it says, oh, warning, the last number I couldn't take the square root, so I'm going to put that weird sample instead of the result, which is an, an, which means not a number, okay? It's just because the square root of negative number does not exist, so r is going to tell you, well, this is not a number. It's nice because it's still going to do it and deal with it, and you don't have to worry too much about it. It gives you the warning, but life goes on. We're going to do the same thing with the log of x, okay? Actually, I wanted to do log of 1 plus x, okay? So we want to take the log of 1 plus x. We do that, and this is what we get. Once again, everything's fine except for the last number, because 1 plus minus 1 is 0, and the log of 0 is not defined, right? But the limit is actually minus infinity. So here, r can deal with that as well, and for infinity, it's going to use inf, okay? So here are two things that we can see in our radius that when you don't have something that you shouldn't do and it doesn't give you a number, it gives you a warning, NAN, and it deals with the infinity cases. So that's kind of nice, okay? So we've seen the NAN symbol. We've seen coffee break? No, no break, huh? Okay, let's finish this line and then we'll take a break. So we've seen another number symbol. We've seen the infinity minus infinity, but in statistics or in any sort of science field where you deal with data, it's very common to have missing values, right? So you're gonna do a clinical trial and the patient's gonna come and you're gonna take some blood samples, but one day the patient doesn't show up. Well, what do you do? You're not going to stop the trial, right? So what you're going to do is just going to mark missing value, right? You're gonna say, well, here it didn't come so it couldn't take the sample. So you need a way to deal with missing value. You need a way to tell R that there's a missing value. And the way to do that is just to code the missing value by NA. And what's nice about R is that depending on the context, it will actually provide different ways to deal with missing values. So here's the example and we're gonna look at that right after the break.