A site to help Biochemists learn R.

Starting points

Monday, 20 April 2015

Getting Started with R-Studio...

I think R-Studio makes R easier

For me, finding and using R-Studio was a key step to coming to grips with R. R-Studio is just one of the IDEs - an integrated development environments - available for R. I use it because:

  • it was the first one I found
  • it's free
  • the interface looks similar in both Mac and PC

For these reasons, I will be introducing and using R-Studio in the one day course. Prior to the course, it's important to:

  • download R - it's here.
  • download R-studio - here is the R-studio home page.
  • ideally check that it all works by following the rest of the information on this page. 

Starting R-Studio

Please start the R-studio software.
This should give you a window like this:


Choose "New Directory"

You get this:


Choose "Empty Project"


You need to give a name to your project and choose a location to save the files into. 
Try to choose a name that is meaningful to you. 

The name I chose is "MyAnal20150420"

This now provides this kind of window:


This area allows you to use R in a slightly easier way than just the prompt. That is a bit more interactively. 

Orienting you in R-Studio

The window on the left that makes up most of this screen is the Console. 
Please press the top right hand corner of this window:


This changes the window to this:


This is the same window with some explanations:


Don't worry if this doesn't make much sense yet.
To make R do stuff you can write directly in the console window, or you can write some "scripts", you will run them to add data and to make graphs and then you will get the output.

To check everything is working go to the window on the bottom and type:
2 + 2
and then press return....

You should get 4, as per this picture:




CONGRATULATIONS - YOU'VE DONE YOUR FIRST CALCULATION WITH R.
You need to have done this BEFORE you join us on the R for Biochemists Training Day.
I will be adding a post about how to draw a simple graph over the next few days.





No comments:

Post a Comment

Comments and suggestions are welcome.