Overview
In November 2017 I taught a lecture and workshop on basic statistics with R at the Lao Statistics Bureau in Vientiane, Lao People’s Democratic Republic. The programme was sponsored by the Korea Statistics Promotion Institute. My opening slides are dated 13 November 2017, and the daily class notebooks that follow are dated 14 to 16 November. The class materials are in English and are built around worked examples written in R Markdown, one notebook per day.
Contents
- Introduction: the instructor, the plan for the week, and where to find the materials.
- Day 2, Titanic survival data: reading a CSV file, counting rows, and working out survival proportions overall, by passenger class, and by sex. The exercise doubled as a review of the first assignment.
- Day 3, exploring data: the
mtcarsdata with a codebook,head,tail, andsummary; histograms and scatter plots with ggplot2; vectors, data frames, and lists; renaming columns and creating new variables such as totals, averages, and letter grades. - Day 4, data manipulation with dplyr:
filter,select,arrange,mutate, andgroup_by, chained with the pipe operator, practised through a series of short quizzes on a class exam data set.
Tools and materials
- R and RStudio; installers and package archives were kept with the course files.
- Packages: dplyr, ggplot2, magrittr, readxl, knitr.
- R Markdown notebooks for each day, rendered to HTML and Word.
- Practice data: Titanic survival records,
mtcars, and a small exam score file.
Citation
Chae, C. (2017). Basic statistics with R. Lecture and workshop at Lao Statistics Bureau sponsored by the Korea Statistics Promotion Institute, Vientiane, Lao People’s Democratic Republic.