background preloader

R

Facebook Twitter

R-bloggers | R news & tutorials from the web. R Programming Resource Center. R is a powerful software system designed for manipulating, analyzing, and graphing data. Essentially anything you can do using other popular off-the-shelf statistical software can also be done in R. In addition, R is an integrated programming environment, allowing users to script their own functions (or modify existing ones) to do customized tasks. This provides much of the flexibility of languages such as C, but with the advantage of building upon R's robust numerical routines, data management functions, and graphing tools. While the base installation will be sufficient for many users, hundreds of downloadable add-on packages have been developed for accomplishing specialized tasks, often using cutting-edge methods.

Resource portals Official R homepage Comprehensive R Archive Network (CRAN) menu of user-contributed R packages. Official R manuals An Introduction to R: Comprehensive introduction to the essentials of R. General help Statistical analysis Spatial processing and analysis. Home Page. GRASS GIS - R: Learning R statistical data language. Short Introduction to Geostatistical and Spatial Data Analysis with GRASS and R statistical data language [Table of contents] DRAFT Document!

Learning statistical data analysis using "R" The R examples described here are (should be) platform independent. 1. Basics To start R, enter: (Windows: click onto the Rgui icon) R provides a set of base functions, which can be extended by using contributed packages (to be installed additionally). #don't get confused: the code package is called VR, the library MASS: install.packages("VR") library(MASS) To get R command help, you can always add a ?

? Additionally there is the FAQ). R is an object oriented data analysis language. To get the result, just enter the name of the object: Basics: Drawing a function A simple example is to plot a sine curve. X <- seq(-2*pi, 2*pi, len = 100) x str(x) summary(x) Then we can plot it (the type parameter specifies the line type): matplot(x, sin(x), type="l") To get an idea about the various "matplot()" options, run: 2. Rtips. Revival 2012! Paul E. Johnson <pauljohn @ ku.edu> The original Rtips started in 1999. It became difficult to update because of limitations in the software with which it was created. Now I know more about R, and have decided to wade in again. In January, 2012, I took the FaqManager HTML output and converted it to LaTeX with the excellent open source program pandoc, and from there I’ve been editing and updating it in LyX. You are reading the New Thing! The first chore is to cut out the old useless stuff that was no good to start with, correct mistakes in translation (the quotation mark translations are particularly dangerous, but also there is trouble with ~, $, and -.

(I thought it was cute to call this “StatsRus” but the Toystore’s lawyer called and, well, you know…) If you need a tip sheet for R, here it is. This is not a substitute for R documentation, just a list of things I had trouble remembering when switching from SAS to R. Heed the words of Brian D. 1.1 Bring raw numbers into R (05/22/2012) Step 1.