2. What is R?
A FREE program widely used for statistical analysis.
3. Why use R?
Strengths
- Free
- Creates graphs that are publication-quality
- Lots of code and packages have been written
for it. You’re able to use packages that analyze
biodiversity, the human genome, or speech
patterns for example.
- A wealth of support and resources
4. What is R?
Limitations
- Takes a bit of time to learn but may be well
worth your while in the long run
- Unable to handle very very verylarge
quantities of data. For most purposes, R is great
10. Functions
To search functions, you can use www.rseek.org or go to Software Resources for R.
Here are some simple ones:
Mean >mean(COLUMN)
Variance >var(COLUMN)
Median >median(COLUMN)
Standard Deviation >sd(COLUMN)
11. Helpful Links and Tutorials
• The R Project (r-project.org) – The official R website.
• R Commander (www.rcommander.com) - A graphical user interface (GUI) that
some find makes R easier to use.
• Software Resources for R* (courses.statistics.com/software/R/Rhome.htm) – A
great resource for using and running basic statistical analyses on R.
• R Basics Blog* (http://rtutorialseries.blogspot.com/2009/10/r-tutorial-series-
introduction-to-r_11.html) - A blog on how to use R. Awesome step-by-step
walkthrough with screenshots.
• R Seek (www.rseek.org) - A Google custom search for R related webpages.
• True Random Number Generators (random.org) – Not all random number
generators are created equal. If you require the use of random numbers in your
statistical analysis, this website is great.
Editor's Notes
Here’s an introduction. I’ll give you the tools to learn, use and play with R, but I’m not an expert so I’m unlikely to answer your questions. I am, however, able to direct you to resources online.
In order to use R, we must learn the language of R. It’s similar to MatLab and Stata. More sophisticated programs can be very costly (hundreds, upwards to thousands of dollars), but they’re designed to handle a TON of information. I’m not fluent in R, but I do know a few phrases and will walk through an example with you.
We usually input our data into Excel spreadsheets. Convert that to .csv file so R can understand.
To use R, you must communicate with the program in it’s own language. Like learning all languages, the best way to get familiar with it is to use it in practice. So the first step is to download the program.
Pick your topic of conversation. Choose where you want your working directory [wd] from. This is where your data should be located. Double-check if you’re unsure by typing in “getwd()” again.
Type “read.csv(“FILENAME.csv “) that’s located in your working directory. R should regurgitate your data.Renaming your dataset can save you some time and hassle.
Attaching your dataset allows R to save your data to it’s workspace. You will be required to reattach these values every time you run R.