R course - The Basics
This seminar addresses everybody who is interested in learning R from scratch.
This workshop is also intended as a preparation for the advanced modules? and courses in applied statistics and data analysis? as well as data visualisation, which require some scripting skills.
There will be
- a little theory
- focus on technical aspects (not on interpretation)
- time for questions and answers
- hands-on training based on the requests you write in the comment field of the registration form. Feel free to approach us with your data
2. Organizational issues
Instructor: Guido Kraemer
Date: Wed and Thu, May 18-19, 2016
Starting time: 9.00 am
Place: Seminar room B0.004 (MPI-BGC)
3. Content of the course
Intro & Graphics - Wed, May 18 (9-12 am)
- RStudio & R as a calculator, operations: +-*/, sum
- Read and Write files
- Data types: logical, numeric, character ...
- Data structures: vectors, matrices, lists, data.frames, arrays
- navigating the R universe: finding help, searching documentation, finding the right packages/functions for the right purpose.
- High-level graphic functions
- plot, barplot, boxplot, contour, curve, hist, image, mosaicplot, pairs, persp
- Low-level graphic functions
- abline, arrows, axis,grid, legend, lines, mtext, points, polygon, text, title
- Saving graphics
- pdf, png ...
Basic statistics & Programming 101 - Wed, May 18 (1-4 pm)
- Univariate descriptive statistics
- mean, median, quantile, range, min, max, var, sd
- plot, hist, boxplot
- Multivariate descriptive statistics
- cov, cor
- linear regression: lm, summary, plot.lm
- if, else
- Loops and friends
- for, while, apply & co
- Debugging (with Thomas Wutzler)
- Processing of character strings
- match, grep, paste, strsplit, sub, gsub ...
Introduction to NetCDF - Thu, May 19 (9-12 am) In preparation for the skill course 'Applied statistics & data analysis'
- Reading and writing
4. What you need to prepare
Bring a laptop and make sure that a recent version of R and R Studio is running on it.
You can download the most recent version here: http://www.r-project.org/
RStudio is a new open-source integrated development environment that runs on all platforms. It nicely combines console, script editor, working directory, plots etc. into a an uncluttered layout that you can easily navigate. You need to have R installed before you can use RStudio as a development environment.
Please also make sure that you can access the internet via WLAN (BGC-users, if you have a BGC-account; BGC-guests, if you don't have an account)
This is the course material from previous years:
- Here is a list of useful online resources to accelerate your progress.
- Advanced R by Hadley Wickham
- Help topics
The survey gives feedback of 9 (out of 12) participants which was given by mid-June.
A retrospective assessment was requested after 10 months where 5 (out of 12) participants filled in the survey. Results are given here.
Statistics and statements should not be taken as an exhaustive or exclusive list.