The textbooks for the course are
This book also comes with the R distribution. It is available in various formats as the files
R-intro.html R-intro.pdf
R-exts.html R-exts.pdf
Do not print copies of these on department laser printers! The department staff will get mad at you if you do.
Do not print copies yet! These documents change slightly with each version of R, and I will upgrade R to the then current version just before class starts.
A paper copy for photocopying can be obtained from the department office and is also at Copies on Campus in the basement of Johnson Hall (not available yet, will make available when R is upgraded to the current version just before class starts in January).
The standard reference is K & R (see also at the publisher's web site). But many find this too elegant and austere. It is the right book if you are already an experienced programmer.
A more user-friendly reference is the pink cow book.
If you already know C or have a book about C, there is no need to buy a book.
I have put my copy of the pink cow book in the lab, so you can use it there if you will be doing most of your programming in the lab.