We need to install two things onto your computer. The first is R, this is the programming language we will use. After that we need to install RStudio, this is a front end program that lets you write R code, view plots, and do many other useful things.
If you have a previous installation of R and RStudio, that you have not used much, please remove these first from your computer, and download the current versions as per the instructions below.
Use the download link at the top and save the file.
Run the installer (double click), default settings are fine. If you do not have admin rights on your laptop, then ask IT. If this is the case, it is important to ask them to give you full permissions to the R directories. Without this you will not be able to install packages. If there is any other problem, we can help you sort it out at the pre-course Zoom checks.
The page should recommend the right file based on your system, if not scroll for all the options. If you are having trouble, we can help you sort it out at the pre-course Zoom checks.
Check R and RStudio are working
Open RStudio, it should look like the image below.
We are going to try to run the following code, follow instructions below.
Copy the code above and paste it in the Console window in R studio, by the > sign, before you hit enter it will look like this.
Hit enter, the code will run, and there will be a plot will be created in the plot window on the right.
If you have a plot similar to mine, all is well, you have installed R and RStudio. You will still need to come to the pre-course Zoom chat just to check your setup, but it will be super quick. If there are any snags, we can chat about it then.
Setting up your screen well from the start will help get you coding fast, we strongly recommend you try the setups recommended below. The lessons look a lot like RStudio, and it is easy to get confused between your own code and the lesson code. To differentiate the two visually we recommend you change your RStudio theme to something with a dark background.
In RStudio go to Tools > Global Options
Choose ‘Appearance’
Under ‘Editor theme’ chose ‘Idle Fingers’ (or another dark theme)
If you have dual monitors, you’re all set, put RStudio on one and everything else on the other. If you have a single monitor, then you need to be a little more organised.
Put RStudio on the left half of your monitor
Inside RStudio, grab the vertical bar between the Console and the Files/Plot windows and squish it to the right, until you mostly just see the Console.
Put Zoom in the top left corner, taking up about a third of the vertical space. Sometimes I will ask you to go full screen on Zoom, practice going from full screen to top right corner.
Put your browser in the bottom right, taking up the other two thirds of the vertical space.
Even if you use RStudio, you'll still need to download R to your computer. RStudio helps you use the version of R that lives on your computer, but it doesn't come with a version of R on its own.
To make things simple, we recommend to install first R and then RStudio. R can be downloaded and installed on Windows, MAC OSX and Linux platforms from the Comprehensive R Archive Network (CRAN) webpage (http://cran.r-project.org/).
First time users of R are often confused as to the difference between R and RStudio. RStudio is actually an add-on to R: it takes the R software and adds to it a very user-friendly graphical interface.
What's the Difference? R the application is installed on your computer and uses your personal computer resources to process R programming language. RStudio integrates with R as an IDE (Integrated Development Environment) to provide further functionality.
R and RStudio are free and open-source, and can be installed on any Windows, Mac, or Linux computer that you have appropriate permissions to install software.
By compiling R to WebAssembly a user can visit a website and run R code directly within the web browser, without R installed on their device or a supporting computational R server. All that is required is a normal web server, including the type of cloud hosting service provided by Github Pages or Netlify.
One of the advantages of using RStudio is that all the information you need to write code is available in a single window. Additionally, with many shortcuts, auto completion, and highlighting for the major file types you use while developing in R, RStudio will make typing easier and less error-prone.
We only need to install a package once on our computer. However, to use the package, we need to load the library every time we start a new R/RStudio environment. You can think of this as installing a bulb versus turning on the light.
Yes, you can write and execute R code without using R Studio. R is a programming language and software environment for statistical computing and graphics. You can write R code using any text editor or integrated development environment (IDE) of your choice.
Introduction: My name is Stevie Stamm, I am a colorful, sparkling, splendid, vast, open, hilarious, tender person who loves writing and wants to share my knowledge and understanding with you.
We notice you're using an ad blocker
Without advertising income, we can't keep making this site awesome for you.