Skip to Main Content
University of York Library
Library Subject Guides

Coding: a Practical Guide

R

R

R is a coding language (and a coding environment) for doing statistical work.

Introduction to R

These materials are for the Introduction to RStudio session run by the Maths Skills Centre at the university. There is an outline of the session and a video of the workshop that can be used to work through the exercises.

After introducing the RStudio interface, it will introduce an RStudio workflow that includes importing, managing and plotting data. Suitable for people who have not done any computer coding before.

Find out when the session is next running on the Maths Skills Centre webpages.

Further resources and help for R

If you're stuck with something when using R, here's some places to look for help:

  • Search online using keywords and look for useful sites like stackoverflow where people share their coding problems.
  • Use the help function help(“ggplot”) or ?ggplot. Standard manual layout.
  • Quick-R at statmethods.net uses information from R manual where information follows a standard format.

If you've done the introduction to RStudio workshop or watched the video on this page, you might be looking for more R resources. Here's some further introductory material on RStudio Skills and Data Analysis Concepts made by the University of York's Biology department (these require a University of York login).

RStudio Skills and Data Analysis Concepts (University of York)

This playlist of short videos on RStudio and Data Analysis skills are from data scientists in the University of York's Biology department. These videos require a University of York username and password to login and view.

The first eight videos are on RStudio skills and are broadly applicable. The later videos on data analysis concepts use R to analysis biological data specifically, though the concepts can be relevant to any discipline.

Two of the data analysis videos, 'R tools to summarise large data sets' and 'Exploring data with plots and summaries' have some datasets that if you're following along, you will need to download from this Google Drive folder to be able to use.

If you're looking for further materials from outside the University to learn more about what you can do with R, then here's some suggestions. There are also lots of free resources and courses online, but remember to think critically about them!

General R resources

Using R with humanities data

R offers some versatile options for working with textual data and other kinds of data that can be common in humanities research.

N8 CIR has online resources from a training session on an introduction to R for Text Analysis.

The Programming Historian site has a range of lessons that involve using R with different datasets. Start with lessons like R Basics with Tabular Data and Basic Text Processing in R to explore working with different data types in R, and then you might want to focus on further lessons like Data Wrangling and Management in R or Temporal Network Analysis with R. If you're doing tasks like correspondence analysis or using geospatial data for humanities research, there's also further lessons covering these more specific topics.

Exercises

Take a look at the session materials on this page to have a go whilst you're attending the R session.

If you're not doing the session and want to try out R, see the further resources box on this page for online materials that can help you get started.

Installing R and RStudio

You can download R and RStudio for free online (download for Windows or Mac).

If you're at the University, IT Services have guidance on how to get R and RStudio on managed machines or use them on classroom PCs).

Doing data analysis?

If you're looking to do data analysis with coding and need some help with what methods you might use, which coding languages to try, or how to get your data into the right format/shape for analysis, see our Analysing Data Skills Guide.

Feedback
X