Home > Research > Activities > Workshop 'Introduction to R and R Markdown', co...
View graph of relations

Workshop 'Introduction to R and R Markdown', co-organised with N8 CIR

Activity: Participating in or organising an event typesParticipation in workshop, seminar, course


[To follow]

Workshop at Durham University (date to follow)

Information: https://github.com/pablobernabeu/Data-is-present/blob/master/N8-CIR-workshops.md

Introduction to R

This first part can serve as an introduction to R or a revision. It demonstrates what can be done in R, and provides resources for individual training. Since the duration is limited, online courses are also recommended (see examples and fee waivers for full content).

- Data structures

- Packages: general-purpose examples (e.g., tidyverse) and more specific ones (e.g., for statistics or geography)

- Loading and writing data, in native and foreign formats

- Wide format (also dubbed 'untidy') versus tidy format (also dubbed 'long' or 'narrow'). For most processes in R, data needs to be in a tidy format.

- Illustration of wide and tidy data formats, from Postma and Goedhart (2019)

- Combining data sets

- Data summaries

- Plots with ggplot2::ggplot()

- Interactive plots with plotly::ggplotly()

- Statistics

- Linear mixed-effects models (see also a review of practices)

- How functions work

- Debugging. Code errors are known as bugs. They can tiresome, but also interesting sometimes!  Some tips for the first many years of experience include: reading and investigating error messages, in both source and console windows; controlling letter case and typos; closing parentheses and inverted commas; ensuring to have the necessary packages installed and loaded; following the format required by each function. To debug, break up code into subcomponents and test each of those to find out the source of the error. Once we act on that, the best outcome is seeing the code work, but sometimes different errors overlap, in which case we may see one error disappearing before another one appears. Debugging soon leads to proficient information seeking. The search process often begins on an internet search engine and extends to user communities, package documentation, tutorials, blogs... (see at a talk). Advanced debugging tools are also available.

- Vast availability of free resources on the internet, from Coursera and other MOOC sites, RStudio, University of Glasgow, Carpentries, etc.

- Community: StackOverflow, RStudio Community, Github issues (e.g., for R packages), etc. Using and contributing back.

- RStudio Cloud: a personal RStudio environment on the internet

R Markdown documents

Set your input and output in stone with R Markdown. These reports may be enriched with website features (HTML/CSS) and published as websites, PDF, or Word. Moreover, with R packages such as bookdown, bookdownplus, blogdown and flexdashboard, documents can be formatted into websites, digital books and data dashboards. Other useful packages include rmarkdown, knitr, kableExtra and ggplot2.

Event (Conference)

TitleWorkshop 'Introduction to R and R Markdown', co-organised with N8 CIR
CountryUnited Kingdom
Degree of recognitionNational event