The follow along R project in the YouTube video below shows how to load a spreadsheet into an R script, manipulate the data by pivoting columns, and then producing a line chart with data points. The spreadsheet used in the project can be found below.
The original source data can be found at https://www.gov.scot/publications/teacher-census-supplementary-statistics/