Day One:
Introduction

~60 min

Overview

Questions

  • Who we are?
  • What are we going to do in the course?
  • How is the course organized?
  • How do you access/use the course material?
  • R/RStudio why and How?

Lesson Objectives

To know the course

  • Objectives and topics.
  • Teachers and their contacts.

To be able to do/use

  • Course website and slides.
  • Course cloud workspace.
  • R sessions within RStudio.

Ts/TAs presentation

Corrado Lanera

  • Assistant professor at the Univ. of Padova - Italy.

  • Responsible for the Laboratory of Artificial Intelligence for Medical Sciences.

  • Rstudio Certified Instructor in the Tidyverse.

  • Daily working with R since 2014.

  • Best citation: “The only way to go fast is to go well” - Robert Uncle Bob Martin.

  • Contacts:

Staff

Administrative

  • Giulia Lazzaretti
  • Chiara Giarracca

Scientific

  • Ileana Baldi
  • Dario Gregori
  • Corrado Lanera

Support

  • Ajsi Kanapari
  • Daniele Sabbatini

Course organization,
Teaching materials, and
Personalized assistance

Main Objective

The training course is expected to cover an introduction to R for exploratory data analysis (EDA): data management, tabular descriptive analysis, and visualization.


Teaching Philosophy

  • We are not professional programmers.
  • We spend more time understanding rough code than writing it cleanly directly.
  • We gain more enthusiasm from (even small) practical results than from theory.
  • We’ll learn better by doing, and cannot become professionals from beginners attending a single course.1
  • We solve problems better in groups than alone.

So we will

  • Present small pieces of concepts at a time.

  • Select packages, functions, and coding styles to prioritize the ease of understanding.

  • Ask you questions often and write and execute code at incremental stages of each topic.

  • Assign you homework for the next lesson to discuss together.

  • Provide platforms to answer and discuss collaboratively.

Course organization

The course will take place virtually on Teams every Monday and Thursday from 1:30-5:00 p.m. CET between February 26th and March 07th 2014 (4 half-days over two weeks)

  • Session 1: 2024 February 26, 1:30-5:30 p.m. CET (Click here for your timezone).1

  • Session 2: 2024 February 29, 1:30-5:30 p.m. CET (Click here for your timezone).

  • Session 3: 2024 March 04, 1:30-5:30 p.m. CET (Click here for your timezone).

  • Session 4: 2024 March 07, 1:30-5:30 p.m. CET (Click here for your timezone).

Teaching Materials & Resources

Teams’ room:
Website (agenda, slides, and assessments): https://bit.ly/ubep-rws-website
RStudio cloud workspace: https://bit.ly/ubep-rws-rstudio1
Really real-time collaborative pad (chat included): https://bit.ly/ubep-rws-pad-ed3


Assistance

  • Technical Assistance: no infrastructural technical assistance will be provided during the session by UBEP staff. Please contact your ECDC IT staff for this matter.

  • Rstudio Cloud Assistance: write on Teams chat, and a person from UBEP will contact you directly on a separate Teams meeting

  • Coding issues and questions: feel free to discuss and collaborate on the pad’s chat

  • Local installation of R/RStudio: not required for the course, and we won’t teach the course on your local installation. However, we will provide you with instructions and support.

Groups

Group A Group B Group C
Elona Kureta Sabine Maritschnik Lutz Ehlkes
Ayat Yaghy Amber Litzroth Besfort Kryeziu
Noemí López Perea Sanja Vuzem Zeina Farah
Michaela Špačková jean-sebastien CASALEGNO Antonello Amendola

Rooms

Main: me (Corrado Lanera)

Room 1: Ajsi

Room 2: Daniele

Slides

  • From the website (https://bit.ly/ubep-rws-website), you can access the slides of the day and navigate them at your pace.

  • You can follow and navigate the presentation slides on your phone, tablet, or laptop from the web. When the presenter changes slides in their screen-shared (master) presentations, everyone will follow and see the same content on their device.

Lessons organization

  1. Discussion on the previous lesson’s homework.

  2. Overview and aims of the day.

  3. Passive-interactive-active cycles.

  4. wrap up, and summary.

  5. Homework assignment presentation.

  • Passive: slide presentation with sample code and suggestion.

    mtcars |> 
      ggplot(aes(hp, mpg)) +
      geom_point()

    Tip

    • You inject (|>) the previous code’s result into the subsequent function call
    • You add (+) layers to a plot.
  • Interactive: questions for you to answer.

    Your turn

    Connect to our pad and present yourself.1

  • Active: incremental coding project.

03:00

R/RStudio











R

  • A language: we write R code in the R language.

    two <- sum(1 + 1)
  • An Engine: able to execute computations, analyses, graphs, reports, …

    library(tidyverse)
    
    mtcars |> 
      ggplot(aes(hp, mpg)) +
      geom_point(aes(colour = cyl)) +
      labs(
        x = "Gross horsepower",
        y = "Miles/(US) gallon",
        colour = "N cylinders"
      )

  • An Interpreter (that translates back-and-forth R code to executable code)

    • When we run code in R language, the interpreter translates it for execution.
    • When R has computed the results, the interpreter translates/prints it back to us.
    sum(1:3)
    [1] 6

RStudio Cloud

  • A fully functional RStudio IDE on the cloud.

  • Free for you to use within the course workspace.1

  • Once you join the workspace, you can enter the R project provided for the day.

  • The environment is already set for you

RStudio (in the cloud) [side-by-side]

IDE = Integrated Development Environment (to work with R)

  1. side- and top-bar for workspaces and projects navigation.

  2. Multi-tab text editor to view, modify, execute (CTRL/CMD + ENTER) code in script files

  3. An interactive console for the R interpreter.

  4. Overview of defined R objects in the current session.

  5. Embedded file explorer connected to the current session R working directory.

(Afte registration) To connect to RStudio cloud: https://bit.ly/ubep-rws-rstudio

Your turn (main: A; bk1: B; bk2: C)

Your turn

  • Connect to RStudio cloud (https://bit.ly/ubep-rws-rstudio) and:

    • create new a project on our workspace
    • do some operation (anything) interacting with R console
    • create a script with the code above, and save it
    • run the script and check the result in the console

Groups

  • Main room: group A
  • Brakeout room 1: group B
  • Brakeout room 2: group C
15:00

Suggested screen layout [optional]

  1. Teams:
    1. Shared screen
    2. Speaker view
    3. Chat (assistance & reactions)
  2. RStudio Cloud
  3. Real-time collaborative pad:
    1. Exercise
    2. Comments
    3. Chat (your discussion place)

Suggested screen layout [optional]

  1. Teams:
    1. Shared screen
    2. Speaker view
    3. Chat (assistance & reactions)
  2. RStudio Cloud
  3. Real-time collaborative pad:
    1. Exercise
    2. Comments
    3. Chat (your discussion place)

Break

10:00

Acknowledgment

To create the current lesson we explored, use, and adapt contents from the following resources:

The slides are made using Posit’s Quarto open-source scientific and technical publishing system powered in R by Yihui Xie’s kintr.

Additionl Resources

License

This work by Corrado Lanera, Ileana Baldi, and Dario Gregori is licensed under CC BY 4.0

Wong, Nathan Colin. 2015. “The 10 000-Hour Rule.” Canadian Urological Association Journal 9 (9-10): 299. https://doi.org/10.5489/cuaj.3267.