Posts about R

Learning R by video

For those people who prefer to be shown how to do something rather than read the instructions, there are some videos on using R available online. Here are the ones I know about. Please add links to other similar resources in the comments.

R videos
Learn R Toolkit
What is R? from Revolution Analytics

R Statistics playlist [...]

Tags: ,

Using Google Reader

Google Reader is a fantastic way to keep track of new papers that are appearing in many different journals, and also to follow some of the interesting research blogs (and blogs on other topics) that are out there. Google Reader checks websites for you and lets you know of any new material that appears. Instead of [...]

Tags: , , , ,

Workflow in R

This came up recently on StackOverflow. One of the answers was particularly helpful and I plan to adopt this for my future work. In fact, it is close to what I already do, but is a little more structured.
The idea is to break the code into four files, all stored in your project directory. These [...]

Tags: ,

Finding an R function

Suppose you want a function to fit a neural network. What’s the best way to find it? Here are three steps that help to find the elusive function relatively quickly.
First, use help.search(“neural”) or the shorthand ??neural. This will search the help files of installed packages for the word “neural”. Actually, fuzzy matching is used so [...]

Tags:

R help on StackOverflow

Ever since I began using R about ten years ago, the best place to find R help was on the R-help mailing list. But it is time-consuming searching through the archives trying to find something from a long time ago, and there is no way to sort out the good advice from the bad advice.
But [...]

Tags: ,

Building R packages for Windows

1. Installing the required tools
To build an R package in Windows, you will need to install some additional software tools. These are summarized at
http://www.murdoch-sutherland.com/Rtools
1.1 Essential: Rtools
This is a collection of unix-like tools that can be run from the DOS command prompt. It also contains the MinGW compilers that are used for [...]

Tags:

Time series packages on R

There is now an official CRAN Task View for Time Series. This will replace my earlier list of time series packages for R, and provide a more visible and useful entry point for people wanting to use R for time series analysis. If I have missed anything on the list, please let me know.

Tags:

R books

Amazon.com Widgets

Tags: ,

R workshop

There was an R workshop on 28-29 June, just before the Australian Statistical Conference. I put in an appearance on the second day giving two talks.
Time series and forecasting in R

handout
slides

Building R packages for Windows

handout
slides

Tags:

R graph with two y-axes

I’ve been asked how to do this several times, so I thought it might help to put an example online.
x <- 1:5
y1 <- rnorm(5)
y2 <- rnorm(5,20)
par(mar=c(5,4,4,5)+.1)
plot(x,y1,type=”l”,col=”red”)
par(new=TRUE)
plot(x, y2,,type=”l”,col=”blue”,xaxt=”n”,yaxt=”n”,xlab=”",ylab=”")
axis(4)
mtext(“y2″,side=4,line=3)
legend(“topleft”,col=c(“red”,”blue”),lty=1,legend=c(“y1″,”y2″))

Tags: