---
# System prepended metadata

title: 2023-04 <br> SWD1b Introduction to programming in R

---

# 2023-04 <br> SWD1b Introduction to programming in R

Welcome to the hack pad for SWD1b course from Research Computing at the University of Leeds!

You can edit this document using [Markdown syntax](https://guides.github.com/features/mastering-markdown/).

## Contents

1. [Links to resource](#Links-to-resources)
2. [Agenda Day](#Agenda-Day)
4. [What's your name and where do you come from?](#What’s-your-name-and-where-do-you-come-from?)


## Links to resources

- **Posit Cloud** - https://posit.cloud/
- **Contact Research Computing** - https://bit.ly/arc-help
- **Course notes** - https://arctraining.github.io/swd1b-r/
- **Version control with git** - https://swcarpentry.github.io/git-novice/
- **Instructor code** - https://github.com/ARCTraining/swd1b-april-2023



## Agenda Day 1

| Time     | Agenda                                          |
| -------- | ----------------------------------------------- |
| 1000     | Intro, using Posit.cloud, What is R?          |
| 1050     | Break                                           |
| 1100     | R basics, Data structures                       |
| 1200     | Lunch                                           |
| 1300     | Data structures (cont.), Data Types and coercion|
| 1400     | Exploring data frames                           |
| 1430     | Break                                           |
| 1440     | Subsetting data                                 |
| 1600     | Close                                           |

## Agenda Day 2

| Time     | Agenda                                          |
| -------- | ----------------------------------------------- |
| 1000     | Subsetting data (cont.), Control flow           |
| 1050     | Break                                           |
| 1100     | Control flow (cont.), plotting with ggplot2     |
| 1200     | Lunch                                           |
| 1300     | Plotting with ggplot2 (cont.), Functions        |
| 1400     | Dataframe manipulation with dplyr               |
| 1430     | Break                                           |
| 1440     | Tidyr and the Tidyverse                         |
| 1600     | Close                                           |




## What's your name and where do you come from?
- Edit the hackpad and add your name!
- Alex Coleman, research software engineer, loves Python, R and Rust:crab:
- Nancy Hussein, PhD candidate, School of Dentistry
- Trent, PhD student, microbiology
- John O'Dwyer, PhD student/Research fellow, Health Economics, SOMH :shamrock:
- Lishi Tan, PhD, Centre for Decision Research :flag-sg: :scream_cat: 
- Santi Sulandari, PhD student, School of Psychology, learn R to use for meta-analysis :sunflower: 
- Ben Brough, Research Technician - Biology
- Huahan,PhD student,Health Economics
- Zhuo,PhD student, international business :flag-cn: :cat: 
- Ibtihal Barnawi,PhD student, Food Science and Nutrition
- Khawlah Aljunidel, Phd student, Economics, Business school.
- Lauren Gascoigne, Trainee Business Analyst, IT
-
## Getting the data

To get the gapminder dataset for todays course you'll need to use the following command in your RStudio cloud console:

```r=
download.file("https://raw.githubusercontent.com/swcarpentry/r-novice-gapminder/gh-pages/_episodes_rmd/data/gapminder_data.csv", 
              destfile = "data/gapminder_data.csv")
```

## Questions and Answers

Feel free to post any questions you have here or in the Zoom chat. I'll do my best to answer them inline.
How do we download data from Excel?
when I download data from different sources as csv and excel. How can I merge them in one dataset? 
What is the different between using Rstudio in webpage and download it in my PC? and are we going to deal with Rstudio all the time what about R? 
What is the meaning behine typing =TRUE after the commands?  
Can you please post in all RScript on here so we can catch up? Need to be able to understand rather than just try and keep up wiht typing :smiley:



**Increasing RStudio font size** 
> Tools> Global Options> Appearance > Editor Font Size

## Further Reading

- [ggplot2 book](https://ggplot2-book.org/)
- [R for Data Science book](https://r4ds.had.co.nz/)
- [RStudio links to R books](https://www.rstudio.com/resources/books/)
- [Exercism R track](https://exercism.org/tracks/r), Exercism is a website that includes exercises you can test your R skills against
- [Data Carpentry lessons for specific subject domains](https://datacarpentry.org/lessons/)
- [Carpentries alpha lesson on RNA-seq Analysis in R](https://carpentries-incubator.github.io/bioc-rnaseq/)