Genetics     Genetic Epidemiology     Population Genetics    Genome Biology    Epidemiology     Biostatistics     Glossary     Homepage 



Using R for Statistics and Graphics


This is the website of a one-day course first ran in Istanbul in 2019 on basic statistics and graphics with R. The course was designed to address the needs of absolute beginners to use R (R users) rather than for those who want to write their own code (developers/programmers). Anyone who has an interest in learning how to use R and/or statistics should benefit. The course teaches R and statistics at the same time without assuming any prior knowledge. It can be used like a self-paced course. All presentations and R scripts are provided below. From February 2021, the sessions are being delivered online at Kingston University London and video recordings are being made available to those who have access to KU network. During the course, all participants started running R codes within the first 10 minutes without any difficulty. The aim is to bring the participants to a level to enable them to use any cookbook to do most statistical tests they will need and produce graphics by following the cookbooks. The course showed that even with a few hours of training, everybody can start using R even without any knowledge of writing R codes.



(Please download the files first (with right click and Save Link As…)  and then open from your computer)


Basic information about R and links for R users

 R Notes (PDF)     R Links (PDF)


Session 1

(R basics and syntax) 

PPT  PPTX  PDF  Script

Video recordings (KU only): Part 1  &  Part 2


Session 2

(Descriptive statistics and related graphics) 

PPT  PPTX  PDF  Script

Video recordings (KU only): Part 1  &  Part 2


Session 3

(Inferential statistics I: Categorical data analysis)  

PPT  PPTX  PDF  Script


Session 4

(Inferential statistics II: Correlation, t-test, ANOVA and regression) 

PPT  PPTX  PDF  Script


Session 5

(Beyond basic statistics: Statistical power; meta-analysis; survival analysis; ROC curve analysis)  


Scripts for session 5: pwr.R   survival.R  epiR_meta.R   rmeta_cochrane.R   roc_cutoff.R


 All sessions (1-5) as a single file

PPTX (25Mb)  PDF (16Mb)





 quantmod.R   contingency.R   tiff.R

s1.R    s2.R    s3.R    s4.R




epiR_meta.R   rmeta_cochrane.R




Online resources (cookbook style resources for R users)

 Quick-R: (Book: R in Action */(online liveBook))

Instant R: Book > Using R for Statistics *; GitHub)

Cookbook for R: (Book: R Graphics Cookbook)

R Cookbook: (PDF)

How to in R:

R Tutorial:

Basic Statistical Analysis Using the R Statistical Package (Boston University):

Learn R (Data Science Made Simple):

Kickstarting R:

* I find these two books most useful for beginners


You may also use the following two books (open access):

Learn to Use R: Your Hands-on Guide (ComputerWorld)

Introduction to Statistical Data Analysis with R (Matthias Kohl) by Bookboon (2015)


Mehmet Tevfik DORAK, MD, PhD



Genetics     Genetic Epidemiology     Population Genetics    Genome Biology    Epidemiology     Biostatistics     Glossary     Homepage