Friday, 3 October 2014

Using R - the easy way...

R is an open source statistics package. It's very powerful with lots of statistical models that can be used, lots of great graphics that can be made and most usefully - it's free. If you're interested in numbers, data, statistics, graphs, visualisations - R is one of the best tools there is.

I've spend the last number of months learning how to use R and today I want to give a primer on how to use R to do some simple things. Most of these are things that other packages can do - like Google Documents (but you need internet access) or Excel (but you have to pay for it) but you have to start with the easy stuff.

Your first calculation 
Step 1: Download R and unpack it.

Step 2: Download R-Studio and unpack it.

Step 3: Type the following simple text into R-studio:

>3+5

press return

you get:

[1] 8

You've just used R.

Your first graph

> x <- c(1,2,3,4)
> y <- c(2,4,6,8)
> plot(x,y)
>

Import a datafile
Customise a graph
Export a graph.


Using the top box.

Check out RStudio videos

No comments:

Post a Comment