# 2025-07-22-NCL Programming with R ### This document: # https://bit.ly/2025-07-22-NCL ### Links: - [Carpentries](https://carpentries.org) - [RSE Team](https://rse.ncldata.dev) - [Code of Conduct](https://docs.carpentries.org/policies/coc/) - [Workshop website](https://nclrse-training.github.io/2025-07-22-NCL/) - [Link to lesson website](https://swcarpentry.github.io/r-novice-gapminder/) - [Link to data](https://raw.githubusercontent.com/swcarpentry/r-novice-gapminder/main/episodes/data/gapminder_data.csv) - [Pre-workshop survey](https://carpentries.typeform.com/to/wi32rS?slug=2025-07-22-NCL) - [Post-workshop survey](https://carpentries.typeform.com/to/UgVdRQ?slug=2025-07-22-NCL) - [Code Community](https://teams.microsoft.com/l/team/19%3aG79Rz7Mhk6rC0mhia04YCD-nj7WabLMxhnyb1YLp04A1%40thread.tacv2/conversations?groupId=7059214c-2200-4ad6-a739-9d350c74c7a9&tenantId=9c5012c9-b616-44c2-a917-66814fbe3e87) ### Download the gapminder data from [this link to a csv file](https://swcarpentry.github.io/r-novice-gapminder/data/gapminder_data.csv). * Download the file (right mouse click on the link above -> “Save link as” / “Save file as”, or click on the link and after the page loads, press Ctrl+S or choose File -> “Save page as”) * Make sure it’s saved under the name gapminder_data.csv * Save the file in the data/ folder within your project. * We will load and inspect these data later using: ``` gapminder <- read.csv("https://raw.githubusercontent.com/swcarpentry/r-novice-gapminder/main/episodes/data/gapminder_data.csv") ``` #### alternative download method ``` download.file("https://raw.githubusercontent.com/swcarpentry/r-novice-gapminder/main/episodes/data/gapminder_data.csv", destfile = "data/gapminder_data.csv") gapminder <- read.csv("data/gapminder_data.csv") ``` ### Attendance: ## Please sign in using your <span style="color:red">university email</span> and your <span style="color:red">name</span>: 1. Tiago.Sousa-Garcia@newcastle.ac.uk, Tiago Sousa Garcia 2. Robin.Nandi@newcastle.ac.uk, Robin Nandi 3. jannetta.steyn@newcastle.ac.uk, Jannetta Steyn ### General R Setup instructions: ### Ways around network issues: if network drives are causing issues with :H drive, you can save to OneDrive. You can do this by using the file browser to get to OneDrive. ### Installing Packages This information is also in the lesson but because R likes to store its packages on your campus H: drive, you may need to update packages: `update.packages()` a pop-up dialog will appear for each package, click OK (many times!) ##### Useful packages you may want to install - tidyverse, ggplot2 and dplyr ### Long lines? Lines in R can be split by adding a return AFTER an operator. For example: ``` gfg_1=1 + 5 + 7 + 9 ```