Updated times below
Two workshops are planned on December 30, 2022 at the National Science Seminar Complex Hall A (NSSC-A). This is right next to the JN Tata Auditorium (in section G4 on the campus map, building 85 on the pdf version of the map).
Schedule
- 9:00 - 10:30 Visualization and Graphics (Part I)
- 10:30 - 11:00 Coffee break (provided by IISA)
- 11:00 - 12:30 Visualization and Graphics (Part II)
- 12:30 - 1:30 Lunch (provided by IISA)
- 1:30 - 3:00 Advanced R (Part I)
- 3:00 - 3:30 Coffee break (provided by IISA)
- 3:30 - 5:00 Advanced R (Part II)
Prepare for the workshop
- Plan on arriving at the venue by 9am to dispense with registration preliminaries, collecting name tags etc.
- Bring your laptops and ensure they are fully charged for the workshop. Ensure it has adequate free disk space.
- If possible bring an extension power cord: they may be needed.
- If you have not already done so.
- Install the latest version of R on your computer. The current version is 4.2.2 on CRAN.
- Install the latest version of RStudio Desktop
- Make sure you install the following packages in R:
tidyverse
,ggiraph
,gapminder
,benchmarkme
. This can be easily done in an R session via:install.packages(c("tidyverse", "ggiraph", "gapminder", "benchmarkme"))
- For the Advanced R workshop, please ensure you have the following R packages installed from CRAN:
rmarkdown
,docstring
,testthat
,bench
,profvis
andremotes
. This is done in an R session via:install.packages(c("rmarkdown", "docstring", "testthat", "bench", "profvis" and "remotes")
In addition, please install the efficient package from GitHub, as follows:
remotes::install_github("csgillespie/efficient", INSTALL_opts = "--with-keep.source")
Visualization and Graphics Workshop
This workshop will be led by
Ayush Patel, Oxford Poverty and Human Development Institute, University of Oxford.
It is rarely possible to communicate the insights one might have from data without visualizing it. A good visualization will present the information in an accurate, pleasing and memorable manner. In this workshop participants will lean about creating data visualizations using R. While there are many methods (read packages) to achieve this goal, this workshop will be focused on using {ggplot2}.
Outline
- A refresher on data wrangling
- The idea of grammar of graphics
- Introduction to various charts (geometries)
- Adding nuance using aesthetics
- Multi-layered plots (more than one geometry)
- Controlling appearances and aesthetics
- Saving plots
- And then a little more (composing plots and interactivity)
Pre-requisite:
If you know exactly how the following code would work, hop in you are all set.
penguins %>%
dplyr::group_by(species) %>%
dplyr::summarise(
median_body_mass = median(body_mass_g, na.rm = T)
)
In case you know some of the functions or how some of the code will work but are not entirely sure – worry not. There will be a small refresher during the workshop. However, I recommend brushing up from the chapter 5 of R for Data Science. This is sufficient pre-requisite to join this workshop.
References:
Wickham, H, and Grolemund, G. R for Data Science
Advanced R Workshop
This will be led by
Dr. Heather Turner, Associate Professor/Research Software Engineering Fellow, Department of Statistics, University of Warwick, UK.
Writing functions in R enables you to work more efficiently by writing code for re-use in routine analyses. It also equips you to run simulations and implement novel or customised methods. This workshop will provide a hands-on experience for participants to move on from the basics of writing a function in R, learning how write robust and efficient code that incorporates good software engineering practices. We will discuss how such functions could form the basis of an R package for private use or public distribution with an open source license.
Outline
- Writing R Functions
- Components of a function and design considerations
- Using functions from other packages in your functions
- Documenting functions
- Unit testing
- Error Handling
- Debugging
- Efficient programming
- Memory management
- Benchmarking
- Vectorization
- Profiling code
- Going further: outlook to package development
Pre-requisites: Participants should be comfortable with handling basic data structures in R (e.g., creating/indexing vectors and matrices) and familiar with flow control (e.g. using if/else blocks of code).
References:
Wickham, H. Advanced R (2nd edn)
Gillespie, C and Lovelace, R. Efficient R programming