Time commitment
Less than 2 minutes
Description
An overview of the RStudio interface, showing: the source window, the console window, the global environment window, the files window.
Video
Transcript
I would like to show you today…R itself! So this is R, let me adjust this just a little bit so you can see a little bit more. If you've downloaded the files that I sent via e-mail, you will already have this file. If you have R or RStudio installed on your computer, you will be able to open the file that I sent. If you don't have it installed yet, that's okay, I'm just showing you what it looks like. So in our little Word document, I show you what R looks like. I actually had to – the first time I needed to get a screenshot of this – I had to look up how to open just R by itself, because anyone who uses R is really probably using RStudio. So R is just a console, i.e., it's just this little square, and you type what you want to do, you click Enter, it runs the thing for you. You can use R like this, but it's not super user-friendly, it's not super easy to use, it's not super easy to see what you're doing. So you could use R like this, but what most folks are using is they're actually using RStudio. So that's RStudio right here; it's got four pieces instead of just the console. So the console that we saw for R is this piece right here. So RStudio has a console as well, it's down in the bottom left hand corner and we can change the size of it. If you've opened RStudio and you only have three pieces, so this this pane here is like the whole left side, you can ask for a new piece of information by clicking this green plus sign in the top left corner, and saying I want a new R script, and then it will open up this box if you don't already have it.
So what does RStudio have? It has four main sections in the bottom left, which I just showed you, is the “console”, which is the same as what R is. The new pieces for RStudio are these other three pieces that make it easier to work with. In our top left, so if I had just a blank screen right now in our top left, this is where I can write a script. This is our “source window”, this is where I can write something to save it to run it later, or I could save it and send it to a friend, or I could save it and send it to a professor. So if I wanted to save a copy of what I'm doing, I want to do that in the top left, which is our “source window”. You could type all the same stuff down in the console. So down in the console ,I could say what is “2 + 2”, click Enter, and it says hey, the answer to that is 4. You could do that, but that does not save. If I wanted to save it I would have to put it up here and say “2 + 2”, highlight it, run it, the answer is four. It ran the same thing, but this means I can save “2 + 2”.
So we've got our console, we've got our source window. We also have our “environment / history window”, which is in the top right. So that's up here. Right now in my screen it says “Environment is empty” because I haven't saved anything yet. It's got our environment, so I could do something like “a = 2 + 2”, and if I run this, we get some blue text in the bottom left which is saying you ran this thing, it did a command, it ran something. And what did it do? It saved a value to my global environment. I have now said “a is equal to the value of 2 + 2”, which is 4, so a = 4.
So that's our environment window. We also have our history window up here. So if I click “History”, it will show me everything I have done so far. So you can ignore all this stuff up at the top, this was me practicing stuff earlier this week. Today, we've run “2 + 2”, “2 + 2”, and “a = 2 + 2”. All really easy stuff. It's essentially a fancy calculator for now.
We have one more piece; we have our “files / plots / packages / help window” in the bottom right. So this is also something additional that RStudio has. So what I have, is down in the bottom right, I have my “files window” to say where are you working.
So right now I've got a lot more files in here than you probably will have, because I've got our entire series. “Plots”; I haven't made any graphs yet, so this is empty. “Packages”; we'll get to packages, you have to install stuff if you want to work with other things or do additional functions, so I have a couple packages here. And then the “Help” window if you're asking for help. So one of the things I'm working on is next semester's ANOVA, so we have the help window for how to run that ANOVA because I put that in the workshop for you.
Okie Dokie. So RStudio, 4 main sections: bottom left console, top left source window, environment or history top right, and then files plots packages help in the bottom right. Four pieces to help make it a little bit easier for you to work with the software. And then I left you a screenshot of what that looks like. That's our super basic introduction.
License

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
- Ask Chat is a collaborative service
- Ask Us Online Chat hours
- Contact Us