Summary and Schedule
an introduction to R for non-programmers using gapminder data
The goal of this lesson is to teach novice programmers to write modular code and best practices for using R for data analysis. R is commonly used in many scientific disciplines for statistical analysis and its array of third-party packages. We find that many scientists who come to Software Carpentry workshops use R and want to learn more. The emphasis of these materials is to give attendees a strong foundation in the fundamentals of R, and to teach best practices for scientific computing: breaking down analyses into modular units, task automation, and encapsulation.
Note that this workshop will focus on teaching the fundamentals of the programming language R, and will not teach statistical analysis.
The lesson contains more material than can be taught in a day. The instructor notes page has some suggested lesson plans suitable for a one or half day workshop.
A variety of third party packages are used throughout this workshop. These are not necessarily the best, nor are they comprehensive, but they are packages we find useful, and have been chosen primarily for their usability.
Prerequisites
Understand that computers store data and instructions (programs, scripts etc.) in files. Files are organised in directories (folders). Know how to access files not in the working directory by specifying the path.
Setup Instructions | Download files required for the lesson | |
Duration: 00h 00m | 1. RとRStudio入門 |
RStudio内でどのように操作するのか? Rとの対話方法は? 環境をどのように管理するのか? パッケージをどのようにインストールするのか? |
Duration: 00h 55m | 2. RStudio を使ったプロジェクト管理 | R でプロジェクトをどのように管理できますか? |
Duration: 01h 25m | 3. ヘルプの利用 | R でどのようにしてヘルプを得ることができますか? |
Duration: 01h 45m | 4. データ構造 |
R でデータをどのように読み取ることができますか? R の基本的なデータ型は何ですか? R でカテゴリ情報をどのように表現しますか? |
Duration: 02h 40m | 5. データフレームの操作 | データフレームをどのように操作できますか? |
Duration: 03h 10m | 6. データの部分集合化 | R でデータの部分集合をどのように扱うことができますか? |
Duration: 04h 00m | 7. Control Flow |
How can I make data-dependent choices in R? How can I repeat operations in R? |
Duration: 05h 05m | 8. Creating Publication-Quality Graphics with ggplot2 | How can I create publication-quality graphics in R? |
Duration: 06h 25m | 9. Vectorization | How can I operate on all the elements of a vector at once? |
Duration: 06h 50m | 10. Functions Explained | How can I write a new function in R? |
Duration: 07h 50m | 11. Writing Data | How can I save plots and data created in R? |
Duration: 08h 10m | 12. Data Frame Manipulation with dplyr | How can I manipulate data frames without repeating myself? |
Duration: 09h 05m | 13. Data Frame Manipulation with tidyr | How can I change the layout of a data frame? |
Duration: 09h 50m | 14. Producing Reports With knitr | How can I integrate software and reports? |
Duration: 11h 05m | 15. Writing Good Software | How can I write software that other people can use? |
Duration: 11h 20m | Finish |
The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.
This lesson assumes you have R and RStudio installed on your computer.
- Download and install the latest version of R.
- Download and install RStudio. RStudio is an application (an integrated development environment or IDE) that facilitates the use of R and offers a number of nice additional features. You will need the free Desktop version for your computer.