11. INTERNATIONAL STATISTICS DAYS CONFERENCE

R PROGRAMMING

R PROGRAMMING

02 OCTOBER 2018 (Afternoon)

Instructors:

Dr. Heather Turner Department of Statistics University of Warwick UK

Dr. Eralp Dogu Department of Statistics Mugla Sitki Kocman University TR

 

Description: The base R distribution and the vast number of add-on packages provide a wealth of functions for data management and statistical analyses. However understanding how to program in R will enable you to work more efficiently by writing code for re-use in routine analyses. It will also equip you to run simulations and implement novel or customised methods. This workshop introduces the fundamentals of R programming, including data structures in R and controlling the flow of code execution, for example by using for loops. You will discover how to write a custom function that can be used immediately in your R scripts and how to debug errors. 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.

Course Outline:

Topics covered

 - Overview of data structures in R

 - Flow control (for loops, if/else blocks)

 - Writing functions

 - Error handling and debugging

 - Going further

 

Preqrequisites

The workshop will assume basic knowledge of R, such as taught in the Introduction to R tutorial. Participants should come with R installed on their laptop. We will use RStudio for demonstration, but participants may use their preferred IDE.