Skip to content

Latest commit

 

History

History
176 lines (128 loc) · 5.2 KB

README.md

File metadata and controls

176 lines (128 loc) · 5.2 KB

title:Introduction to R

Follow the tutorial

Tutorial webpages

Biography of Thomas and Stefan

Dr. Stefan Widgren is a veterinary epidemiologist at the Swedish National Veterinary Institute and a PhD candidate at the Swedish University of Agricultural Sciences. Stefan uses R on a daily basis and is the author and maintainer of several R packages, including EpiContactTrace, a package to analyse animal movement data and rmatio, a package that reads and writes Matlab files in R. Stefan is also an active member of the rOpenSci community where he develops and maintains the R package git2r to interact with the Git version control system from R.

Dr. Thomas Rosendal is an epidemiologist working at the National Veterinary Institute, Sweden. Thomas has a PhD in epidemiology from the University of Guelph in Canada and has had a focus on analytical epidemiology in his work. Thomas has been a Stata user for many years. He has a specific interest in data visualization, which led to a switch to R three years ago to take advantage of its powerful plotting functionality. Today he uses R for all his data analysis, visualization and reporting.

Learning objectives

This course will teach you the basics of data management and analysis in R. We will teach the following concepts:

  • What is data in R? Why isn't it just a spreadsheet like in Stata?
    • Dataframes, vectors, lists and more!
  • How to open data in R from other software
    • Stata, SAS, excel, .csv
  • Basic data cleaning and manipulation
    • Merging, appending
    • corrections to data
    • Generating new variables in a dataset
  • Implementing and interpreting the output from basic statistical tests and models in R.
    • How does the output compare to Stata's output?
  • Plotting in R
    • Generating plots using base plotting and ggplot2
    • Demonstration of mapping in R, point maps, riskmaps, spatiotemporal map animation

Fee

  • $600
  • $500 for students

Prerequisites

Interest in learning to use R! We will use examples that are related to data summary, analysis and plotting in veterinary epidemiology. Therefore we expect that you have a knowledge of basic statistics.

Participants need to bring their own laptop with the latest version of R (http://www.r-project.org/) installed. The participants also need to install the RStudio editor (http://www.rstudio.com/).

Target audience

You are a person with an interest in data management and data analysis.

We expect that you have either little or no experience with R.

This course is for epidemiologists and students in epidemiology that would like to incorporate R into their work.

History of workshop

This will be the first time this workshop is being offered. We have given a similar format course on the use of R at the Swedish National Veterinary Institute SVA.

Min - max attendees

16 - 24

Duration in days

2

Schedule and content

Browse the course material

Day 1

09:00 - 10:30 (1.5h)

  • 1 Introduction to R and the RStudio editor
    • 1.1 Make sure everyone has the correct software
    • 1.2 How to enter commands in R
    • 1.3 Comparison of an R-script and a do-file
  • 2 Open an existing dataset in R
    • 2.1 Data from Excel, Stata, and text
  • 3 Data structure in R
    • 3.1 What is a dataframe?
    • 3.2 What types of data can you store?
  • 4 Introduction to exploring and managing your data in R
    • 4.1 Summarize
    • 4.2 Tabulate
    • 4.3 Subsetting

10:30 - 11:00 Coffee and snack provided

11:00 - 12:00 (1.0h)

  • 5 Continue with exploring and managing your data in R
    • 5.1 Generating new variables
    • 5.2 Appending
    • 5.3 Merging

12:00 - 13:00 Lunch provided

13:00 - 15:00 (2.0h)

15:00 - 15:30 Coffee and snacks provided

15:30 - 17:00 (1.5h)

  • 7 Introduction to visualization in R
    • 7.1 How to plot your data
  • 8 Demonstration of interactive and dynamic plotting and mapping in R

Day 2

09:00 - 10:30 (1.5h)

  • 9 How to find and read R documentation
  • 10 R Extensions
    • 10.1 How to find and use R extensions (package)
    • 10.2 Demonstration of packages for veterinary epidemiology
  • 11 Install a package

10:30 - 11:00 Coffee and snacks provided

11:00 - 12:00 (1.0h)

  • 12 Plotting continued:
    • 12.1 Plotting using the popular ggplot2 package

12:00 - 13:00 Lunch provided

13:00 - 15:00 (2.0h)

  • 13 Communicate you findings with R
    • 13.1 Create a report with your analysis results, figures and your interpretation in publication quality layout.

15:00 - 15:30 Coffee and snacks provided

15:30 - 17:00 (1.5h)

  • 14 Where to find resources for you next step in learning to use R
  • 15 Wrap up and question and answer period
  • 16 Demonstration of importing and analyzing sequence data