Skip to main content
SAGE
Search form
  • 00:00

    MATT DENNY: Hi, everyone.This is your instructor Matt Denny,and welcome to this lecture on setting upRStudio's appearance, and more generally,just getting sort of acquainted with RStudio.So we've now downloaded R, and thenwe've downloaded RStudio, which I've mentioned,is an integrated development environment for R. Ithas a lot of this add-on functionality

  • 00:23

    MATT DENNY [continued]: and now I'm going to talk you through some of the settingsin a series of two videos that I'm going to do.I'm going to talk you through some of the settingsthat I have set in RStudio that I find make it morehelpful to me as a tool to write good R codeand understand what's going on and be an efficient programmer,and make it also easier to learn how to program.

  • 00:44

    MATT DENNY [continued]: So we're going to cover setting up the appearance of RStudio--primarily, to make it look cool of course.Just kidding.But not really kidding, actually.It is cool to make your programminginterface, your IDE, look cool, but also to makeit a lot more efficient to use.And so we're going to cover thingslike themes and formatting and window layout

  • 01:06

    MATT DENNY [continued]: that I have found over the years to be at least whatworks for me the best in terms of how to set up RStudio.So with that, let's get into the nitty-gritty.I'm going to head over to my desktop,and we're going to open up RStudio.OK, so I'm over here on my desktop,and I've got RStudio set up and ready to go.

  • 01:26

    MATT DENNY [continued]: Now, the first time that you open RStudio, particularlyon a Mac, it might say, hey, you've downloaded this thingfrom the internet.Click on this button to allow yourself to open it.And it might do something similar on Windows.Say yes.RStudio is good, clean, not buggy--well, sometimes buggy, but certainly notvirus-infested software.

  • 01:48

    MATT DENNY [continued]: You can trust it.The folks that make it are really goodand really diligent.And so we're going to open up RStudio.And you're going to get somethingthat does not look like this.So try as I might, I've actually found it very hardto make RStudio revert back to the waythat it looked when I got it the very first time right outof the box.

  • 02:08

    MATT DENNY [continued]: This is how I set up RStudio.And I'm going to talk you through how I set up RStudio.So one of the first things you're going to noticeare these little gray lines here.You can actually adjust these around.They're called panes in RStudio, and you'regoing to have access to four different panes in RStudio.

  • 02:28

    MATT DENNY [continued]: And so I'm going to talk you through each of these.But before I do, I'm going to show youhow to actually make your panes look the same way that mine do.And so to do that on either Windows, Linux, or a Mac,you're going to click on the Tools tab up topand then select Global Options.

  • 02:49

    MATT DENNY [continued]: So that's your first goal right there,is to select Global Options.And this is going to take you to the options, the setupoptions for RStudio.Now, I haven't really told you what RStudio does yet,but just so that we're all on the same pagethat everything looks good, I wantto start by taking you through the pane layouts.So you're going to click on this little button herefor the pane layout.And it's going to give you these little drop-down menu where

  • 03:11

    MATT DENNY [continued]: you can change what goes in each of these fourpanes, corresponding to one, two, three, and four paneshere.So the source is what I'd like to put in the top left.So what source is--the way that RStudio works, it's like a text editor put nextto just the vanilla R console.

  • 03:31

    MATT DENNY [continued]: So if we were to open up just base R, what we'd getis, we get just this big white box.And we can type stuff into it, and it willand it will return us answers.It's just a console.It's like a portal to send commands to the R language,and then R will return answers to us in this portal.

  • 03:55

    MATT DENNY [continued]: What this R console here that comeswith the base version of R--that is what lives over here in the console window, whichI tend to find works well on the top right,and then I put source on the top left.And I give source the most space.Source is like a text editor.And what that means is that we'regoing to actually write all of our R commandsin the source window.

  • 04:17

    MATT DENNY [continued]: So we're going to actually write down commandsthat we want to then later enter into our R console.But whereas commands that we entered into the Rconsole-- they're just gone into the void.You enter them, and then you can't get them back.It doesn't save them for you.If we save them in something called an R script file,which is kind of like a Word document or an Excel

  • 04:37

    MATT DENNY [continued]: spreadsheet or anything else--it's a type of file.It's actually closest to a plain text file.It has a .R, a dot capital R extension,instead of a .txt or a .docx extension.And what it is--it's basically a plain text file that your computer says,

  • 04:59

    MATT DENNY [continued]: oh, this contains R commands.And so that's actually where we'regoing to be storing a lot of our commandsSo I like to put the source here,because this is the biggest window, the one that Iwork in the most often.And then my console in the top right.So this is where we're going to enter in our R commands.Oftentimes, we don't actually need that much space for it.The next thing that I would definitely suggest you do is--

  • 05:20

    MATT DENNY [continued]: so you have all of these other panes that will thenpop up in the bottom two slots.And these are just other useful add-on things that RStudiogives you that you can see.I would suggest putting in the bottom-right paneyour environment, your plot, your help, and your viewerwindow.So check these boxes here, and then check

  • 05:41

    MATT DENNY [continued]: the rest of the boxes in your bottom left.So these six boxes are honestly onesthat I don't use very much, and so I oftentimeswill hide this pane or make it very small.It's not something that I use a whole lot.Whereas the environment in particular,but also your plots and help files--I want those big, and I want them to pop up.I want to be able to see those at the same time

  • 06:02

    MATT DENNY [continued]: as I'm entering in my R commands into the consoleand then I'm actually editing R scripts overin my source window.So if you click Apply, you're goingto get out something that looks kind of the same as whatI have here.And so I just want to quickly touchon what all of these different parts do.So what your environment window will do is,it will actually show you the variables

  • 06:24

    MATT DENNY [continued]: that you're going to create R. Areand this is something we're going to get into.But in R, you're going to be creating the objects thatwill hold data for you, also the different data structures.And you'll be able to see them.You'll be able to physically see or visually seea list, an inventory of all the different things you've created

  • 06:44

    MATT DENNY [continued]: here in the Environment window.If you create plots, they'll show up in this little panehere in the Plots window.And it even has a button to export plots.Also, help.So here we are.I've got some help files pulled upfor connecting to the Twitter streaming API, whichis something that we're going to actually do laterin this course.

  • 07:05

    MATT DENNY [continued]: And the viewer window is another thingthat will help you view objects in R.But these are really useful.Again, the R console.It's the basic console.It's the place where we're going to enter the commands And thenover here, this big thing right hereis where we're going to type R commands.

  • 07:25

    MATT DENNY [continued]: And there will actually be some cool waysthat we can actually get these commands from hereover into the R console automatically.And we'll go over those in the next video.So the next thing I want to do-- so let'sgo back to Tools and Global Options.And just quickly, before we move on,we're going to ignore all the panes down here.They'll have some uses that we might go over

  • 07:46

    MATT DENNY [continued]: in the later videos.But in general, they're not ones that Iuse very often, so I hide them.And again, you can adjust the size of these windowsall you want.So the next thing we're going to do-- we'regoing to go back to Tools, Global Options,and we're going to click on Appearance.And so what Appearance will let you do

  • 08:07

    MATT DENNY [continued]: is let you do three things.It'll let you select your font.So I'm using Monaco as a font, but you can pickwhatever kind of font you want.It will let you select your font size.So I'm using a pretty big font size right now.I'm actually recording this on a pretty large 4K monitor,but in order to make the code viewable for you,especially if you're viewing this on a smaller screen,

  • 08:28

    MATT DENNY [continued]: I am setting my font size to 16.The coolest thing, the most useful thing here, the most funthing, is that you can select the colors that you wantto be displayed in your code.So for example, you can get a cool, dark one.So I like Pastel on Dark.

  • 08:50

    MATT DENNY [continued]: Vibrant Ink.Vibrant Ink is kind of cool.What are the other ones I've used?I don't know.You can just play around through all these different themes.Again, if you want maximum coolness factor,I definitely suggest something like Pastel on Dark.Or what was the other one that I really liked?

  • 09:11

    MATT DENNY [continued]: Cobalt's a little weird for my taste.I guess it is Pastel on Dark.And so if I were to apply this, what will happen is it,will turn everything black and.This will make you look more imposing and coolerif you're using R somewhere.The functions and commands and other things you writewill show up in different colors.This is just some example of what the colors will look like.

  • 09:34

    MATT DENNY [continued]: I am going to be using the Chrome theme, because that'sa very benign, basic theme that should be easy to read.But in general, you can pick a theme if you want,which can be really, really handy.And so the goal here is just to go oversome of the basics of setting up RStudio

  • 09:57

    MATT DENNY [continued]: so you can figure out how to make it look like mine does,change up your color themes however you want,your fonts, your font sizes.Get something that works for you.And so in our next video, I'm actuallygoing to go into some more of these other options,particularly related to the code and packages and someof the other stuff like that.

  • 10:17

    MATT DENNY [continued]: And we're actually going to get into how to make RStudiobe the most useful for you.One other point again.So this is our first time using RStudio.We haven't actually entered any R commands.And that might seem funny.But I think that spending the time setting up RStudiocorrectly, even if you're not totally sure why you'redoing it, will actually be very helpful to youas you're going to actually learn R, learn

  • 10:40

    MATT DENNY [continued]: how to use R and RStudio.So again, these are my settings for how RStudio should appearI would suggest you try them out at least at first,and you can always come back and change how things look later,depending on what optimizes your workflow.But thanks for watching this video,and I'll see you back for a part two in the next lecture.

Video Info

Series Name: Practical Data Management with R

Episode: 6

Publisher: SAGE Publications Ltd

Publication Year: 2017

Video Type:Tutorial

Methods: RStudio, R packages, Programming, Data management

Keywords: computer programming; computer programs; open source software; programming and scripting languages

Segment Info

Segment Num.: 1

Persons Discussed:

Events Discussed:

Keywords:

Abstract

Matt Denny explains how to setup and configure RStudio panes and appearance for maximum productivity.

Looks like you do not have access to this content.

Introduction to RStudio: Customizing RStudio

Matt Denny explains how to setup and configure RStudio panes and appearance for maximum productivity.

Copy and paste the following HTML into your website