[Auto-generated transcript. Edits may have been applied for clarity.] In this video, we're going to cover some of the basics of how to log into the R server, and I'll talk you through the different parts of RStudio. Our studio is the main piece of software that you'll be using throughout the research methods and stats modules. So you're looking at the Moodle page here, and you can see that the link to the RStudio server or the R server is just over here. If you're on campus, you can just click that link and it should take you there. If you are not on campus, you need to make sure that you connect to the VPN first. So VPN stands for Virtual Personal Network, and it is a thing that allows you to pretend to be on campus, even if you're not. Um, if you don't know how to set that up, then go to this page, um, that sits underneath this link, and you'll find instructions as to how to set up a VPN on your device. Okay. Let's go to the R server. So this is the login screen. Um, and it um uses the username and password, um, that you use for anything else to do with Lancaster University. So if you click this blue button, it will. Uh, yeah. Check those credentials. Um, and I have already signed into Moodle, which is why it doesn't ask me again if it is the first thing that you sign into that day that's got to do with Lancaster University. It will ask you for your username and password. Okay. So this is what our studio looks like. Um, we have four quadrants here in the top left. We have what is called the source quadrant. And this is where you will see your different scripts and what a script is. We'll talk about in the different video. Um, then, um, in the top, in the bottom left we have the console in the top right. We have the environment quadrant, and in the bottom right we have a quadrant with multiple panes. And the first thing it takes you to usually is this files tab. So that is where all of your files live. Okay. Before we talk about each of those in turn, let's look at this thing up here. So next to this little blue cube it says Project None. That means we're currently not working in a project. Now, it is a really good idea to create a project and work within a project when you're working in RStudio, because it helps you to organise your files. And it helps R to know where to look for your files. So if I click on this downward arrow here and I say new project in a new directory, and I want to just kind of create a new project. Not any of these other things. Um, so you could create a project for each module. So let's call this 164141 because that's the module that we're currently doing. I say create project. And there we are. So it has now um created the project. You can see that here. Um, it says it has a file here called psych 4141. r proj. And that is the file extension for an R project. And that sits in a folder called psych 4141. And that sits kind of in the, in the R directory in your space on the server. And now you can see here in the top right that um, it says psych 4141. So that is the project we're working in. So far so good. Now it has opened a new session. And in this session, uh, we can't see the, um, source quadrant because it has closed. Uh, the script that we looked at earlier. So let's create a new script. So if you go here to file and you say new file, there are lots of different options. Um, and the type of script that we will be working with, um, are quarter documents. So we open a new quarter document and we can just call it my first script, and we'll create an empty document for now. There we go. Now we have our source window back, our source quadrant, I should say, um, let's see, just looking at my notes to make sure that I don't forget anything. Let's look at each of the quadrants in turn. So, um. In this source quadrant, I, as I said, that will contain the script that you will be working in. And a script is basically a file that contains all the code, um, that you have created to work with data, to visualise data, to analyse data. Um, now code is just a set of instructions. So basically this is a will be a collection of, of all of the instructions that you have created to, to work with data. Now the clever thing about the script is that you can save it, um, using that button here. Um, and then you can come back to it at a later stage and use that code again so you don't have to write it all over again. There's a few other useful buttons here. So we have the run button here. And if you just click on that downward arrow you can see different ways of running bits of code. So that's all. Um, yeah. We'll talk more about this in a later video. But this is where where that is. Um, another useful button is this pancake thing with outline next to it. So at the moment it is empty because we don't have any sections in our script yet. But um, this will have different kind of you can easily see the different, um, headings of the different sections once you've created them, and it helps you to navigate through your script. So let's say if you want to go to a previous section, you can just click here in the outline and you can easily go down. So just it in that way you don't have to scroll endlessly in your script. I think that's all for now. On about the Source quadrant and the scripts then. Now we'll let's have a look at console. So, um, you can think of the console as the quadrant where the output from your script goes. So think of it as the console kind of telling you what is being run and what the output is. Um, you can also do things in the console. So you could do simple maths. So you could say five plus seven equals. And it will tell me that it is 12 which is correct. You could also um assign numbers to certain um to do something like this. You could say so you could say x equals three. Um, and that means that we have now stored this value on the, the name x, we have stored the value three. And we could say y equals four. And now we have stored the value four under the name y. And it has appeared in our environment. Um, and if I then say x plus y, um, and press enter, then it will tell me that if it adds those things up and you get the value seven it's just kind of an example of something that the console can do. It can do way more things. Um, but for now, the main point to remember is that if you want to do something once, you can write it in the console, um, a bit of code. For instance, if you want to, um, be able to come back to two bits of code, then put the bits of code in in your script, because then you can save it and you can come back to it later. Um, now this bit here is, uh, of relevance because here you can see what the directory is. So what the location is of where R is looking for your files. So this shows what is called a working directory. Um, so if you, uh, write a bit of code to ask, ah, to read in a certain data file, um, then that data file needs to be in the file in the folder that you see here. Otherwise ah, can't find it. So, um, here you can see what folder R will be looking in for your files. Okay. Let's move on to the environment window. So that is where your data will appear when you've read them in uh, you can create new data frames or variables and in R and they will all appear here like this x and y things that I created. So basically it is where all the objects, um, that you've read in or created during the session live. Now the environment does have a broom symbol here. And if you click that it cleans your environment. And that can be quite handy actually, because sometimes you've read in multiple files and they all have slightly different names and it all gets very confusing. And you can just click this broom symbol and then it will, um, remove all objects from the environment. So now it's empty clean slate. And then you know what you're looking at. So that is the environment window. Another tab in the environment quadrant here that is useful is the history. So if I click on that you can see what lines of code I have run in that session. So if you want to go back to something that you did earlier and you didn't write it in your script, you can go to the history and you can look it up. Okay. Now in the bottom right quadrant we have multiple tabs. Um, it will start with the files tab. Usually that's where it takes you. Uh, so this, um, this is where your files live, and this is where you can see, uh, our project file that we created earlier called psych 4141. r proj. Our project is the extension that, um, for an R project. So that extension shows us what type of file that is. Now, later on, there will be data files in here. And there might be, uh, you might have made a plot and saved that. And it will all be stored in this particular, um, folder. Um, so, yeah. And you can see here this, this file path here. Um, so that shows you, uh, where, where that folder sits in relation to your home directory. Now, there's a couple of other tabs here that might come in handy at some point. Um, when you use with, when you work with a quarter document, you're, when you create the plot, it will you will see it in, in your quarter document as well. But, um, there is a occasions where, uh, you might it might appear here or you might want to open a plot and it appears here. Um, so that can be handy. Um, then we have the packages tab. Um, this contains a list of all the packages that are installed on the server. Um, it's not currently something that you need to worry about. We'll talk about packages in a different video, but we can see that, um, which ones have been installed here? We can also see which ones are currently active or loaded, as we call that. If there is a little tick here in front of the name of the the package, it means that it is currently active. And then there's the help tab. Um, there is a links here to various online, uh, help resources. Um, yeah, they can be useful. Um, we'll, we'll, we'll have a look at maybe at some of them later. And we'll also talk about what are good places to look for kind of help with coding. Okay. So, um, I think that's all I need to talk about in terms of the quadrants. Now, there is just one thing, um, setting that I think, uh, would be helpful to change. Um, now, yes, this is under tools and you go to Global Options. And in basic you can see how it handles different bits of pieces to do with your sessions. This is all fine actually. And also your workspace. So your workspace is your workspace. So each of you has their own workspace on the R server. And sometimes this is ticked. Restored our data into workspace at Start-Up. This needs to be untick. So if it looks like this you need to click here to make sure that this box is empty and then safe workspace to our data on exit. Instead of saying always or instead of saying ask, you need to make sure that never is selected. Um, so in that way, your workspace will be kind of clean every time you come back to to the our server. Does that mean that your your scripts that are obviously will be will be stored? That is a separate thing. This is just the workspace and the R data. Um, the R data in the workspace just kind of sit behind that. Um, and it prevents problems. Uh, if you kind of choose these two settings. So once you've made sure that this, um, little box is empty and here it says never, you need to say apply. And then you say okay. And then it will remember that those are your preferences. That is it for now.