Sie sind auf Seite 1von 10

Title slide

1
Hopefully sub-module 2.1 convinced you of the utility of using a programming
language for statistical analyses.
A scripting computer language facilitates reproducible science and allows for
flexibility in statistical analysis.
In this course, we will use R for programming.

2
You may have heard of R from you lab mates, advisors, or maybe you already use it.
But what exactly is R?
R is a computing language and environment
Initially written by Ross Ihaka and Robert Gentelman at the Department of Statistics
of the University of Auckland in Auckland, New Zealand.
Since 1997, further developed by a core group of statisticians called the “R
Development Core Team”.
The core of R is an interpreted computer language which allows branching and
looping as well as modular programming using functions.
Consists of a series of “packages” that are used to run a wide range of general
statistical analyses and many discipline specific analyses.

3
You may ask why we chose to use R in this class?
First of all it is FREE which is good for grad students and actually everyone
R is also open source, which means that people can add code, packages and new
analyses.
As a result, we have access to new and cutting edge analyses
Since it is open access and so many people use it, there are forums for the discussion
of R. You can type you error message into the R forum or google how do I do x in R
and you will find answers from R experts.
Commonly used by statisticians and scientists across many disciplines.
This is not just for ecology or forestry, but linguistics, psychology, and finance among
others. The skills are transferrable.
Ability to (eventually) write your own functions

4
R can perform many functions essential to statistical analyses and reproducible
science.
Handle and format large data sets
Basic calculations on matrices and arrays
Advanced statistical “packages”
Advanced and customizable publication quality graphics
Store “scripts” for future analyses

5
I hope everyone is on board here. Part of our goal for this class is to use R.
Generally speaking, this is how R works.
You Download from the “Comprehensive R Archive Network” (CRAN).
CRAN is a collection sites with servers that carry R, packages, and documentation.
You use a command line interface to import data, install packages, run analyses, and
make graphics.

6
To get a little more specific:
R consists of a series of packages that are made up of functions that pertain to a
specific topic.
For example the stats package has a series of function related to statistics.
One of them is called median, which calculates the median of a set of numbers.
Each function has a set of arguments that is entered in a set of parentheses.
In the case of median, we only need to enter an argument that specifies the data we
want to calculate the median for. Here I call it mydata.
Some functions have many arguments and some have only one like we see here.
This is the general makeup of the R language.

7
But enough of me telling you about the R language.
The best way to learn is a hands on approach.

8
But enough of me telling you about the R language.
The best way to learn is a hands on approach.

9
Images

10

Das könnte Ihnen auch gefallen