Difference between revisions of "CRG Introduction to R 2018"

From Bioinformatics Core Wiki
(Created page with "blabla")
 
(Course Syllabus, Schedule, and Materials)
 
(38 intermediate revisions by the same user not shown)
Line 1: Line 1:
blabla
+
__TOC__
 +
 
 +
=== Description ===
 +
This is an introductory course to R programming.
 +
<br> The course is offered in 4 slow-paced practicums for <b>absolute beginners</b>. The goal is to offer a good base with a lot of hands on exercises.<br>
 +
We will use the [https://www.rstudio.com R Studio] of the [http://rstudio01.linux.crg.es CRG server].
 +
<br>
 +
 
 +
=== Course Instructor ===
 +
* [mailto:sarah.bonnin@crg.eu Sarah Bonnin] - Bioinformatician at the CRG bioinformatics core facility.
 +
<br>
 +
 
 +
=== Dates, Time and Location ===
 +
* March 19-20 & April 16-17
 +
* 10:00 - 14:00
 +
* PRBB Bioinformatics classroom (468). 4th floor. The hotel/North wing.
 +
<br>
 +
 
 +
=== Course Syllabus, Schedule, and Materials ===
 +
 
 +
The day before each session, the slides will be uploaded in case you want to print them.<br>
 +
<br>
 +
* <b><u>Day 1</u></b>
 +
** Introduction to R Studio<br>We will use the [https://www.rstudio.com R Studio] of the [http://rstudio.linux.crg.es CRG server] (http://rstudio.linux.crg.es). We will go through what can be done with R Studio, from file and folder manipulation/navigation, to getting help on R functions.
 +
** Paths / directories
 +
** Basics of R: syntax, create an object, manipulate the object, simple arithmetics.
 +
** Functions usage in R<br>Arguments. Get help.
 +
** R scripts: write and save commands, run them as a block. Comment code.
 +
** Data types.
 +
** Data structures:
 +
***Vectors<br>Basic (and most important) data structure in R. We will learn how to create, modify, subset, manipulate, compare vectors.
 +
*** Introduction to factors: categorical vectors.
 +
[[Media:1803_Introduction_to_R_day1.pdf|Slides day1]]<br>
 +
[[Media:1803_Exercises_day1.pdf|Exercises day 1 (1, 2 & 3)]]<br>
 +
Correction of exercises:
 +
* [[Media:Exercise1.R|Correction exercise 1]]
 +
* [[Media:Exercise2.R|Correction exercise 2]]
 +
* [[Media:Exercise3.R|Correction exercise 3]]
 +
<br>
 +
<!-- [[Media:|Exercises day1]]-->
 +
<br>
 +
* <b><u>Day 2</u></b>
 +
** Missing values: how to deal with NA values.
 +
** Matrices & data frames<br>2-dimensional objects: how to create, subset, select, manipulate.
 +
[[Media:1803_Introduction_to_R_day2.pdf|Slides day2]]<br>
 +
[[Media:1803_Exercises_day2.pdf|Exercises day 2 (4 & 5)]]<br>
 +
Correction of exercises:
 +
* [[Media:Exercise4.R|Correction exercise 4]]
 +
* [[Media:Exercise5.R|Correction exercise 5]]
 +
<br>
 +
* <b><u>Day 3</u></b>
 +
** Input / output<br>Reading in and writing out files. Adapting I/O to file format.
 +
** Library / packages<br>Install and load packages. Look for functions in those packages.
 +
[[Media:1804_Introduction_to_R_day3.pdf|Slides day3]]<br>
 +
[[Media:1804_Exercises_day3.pdf|Exercises day 3 (6 & 7)]]<br>
 +
Correction of exercises:
 +
* [[Media:Exercise6.R|Correction exercise 6]]
 +
* [[Media:Exercise7.R|Correction exercise 7]]
 +
<br>
 +
* <b><u>Day 4</u></b>
 +
** Basic plotting (base graphics package)<br>Scatter plots, boxplots, barplots, pie plots, histograms.
 +
** Introduction to ggplot2 package<br>ggplot2 provides functions for creating and customizing plots. We will learn the basic structure and how to produce simple plots.
 +
** Input / output<br>We will save plots as files in different formats, both from R Studio and from the terminal.
 +
[[Media:1804_Introduction_to_R_day4.pdf|Slides day4]]<br>
 +
[[Media:1804_Exercises_day4.pdf|Exercises day 4 (8 & 9)]]<br>
 +
Correction of exercises:
 +
* [[Media:Exercise8.R|Correction exercise 8]]
 +
* [[Media:Exercise9.R|Correction exercise 9]]
 +
 
 +
=== Resources ===
 +
*[https://www.rstudio.com/resources/cheatsheets/ R Studio cheat sheets]
 +
* [https://www.r-bloggers.com/ R bloggers]
 +
* [https://www.r-graph-gallery.com/ R graph gallery]
 +
*[https://www.statmethods.net/index.html Quick R]
 +
*[http://www.cookbook-r.com/ Cookbook for R]
 +
*[https://cran.r-project.org/doc/contrib/Paradis-rdebuts_en.pdf R for beginners - CRAN website]
 +
*[http://style.tidyverse.org/ R Style guide]
 +
*[https://www.datacamp.com/courses/free-introduction-to-r DataCamp: interactive introduction to R]

Latest revision as of 15:38, 17 April 2018

Description

This is an introductory course to R programming.
The course is offered in 4 slow-paced practicums for absolute beginners. The goal is to offer a good base with a lot of hands on exercises.
We will use the R Studio of the CRG server.

Course Instructor

  • Sarah Bonnin - Bioinformatician at the CRG bioinformatics core facility.


Dates, Time and Location

  • March 19-20 & April 16-17
  • 10:00 - 14:00
  • PRBB Bioinformatics classroom (468). 4th floor. The hotel/North wing.


Course Syllabus, Schedule, and Materials

The day before each session, the slides will be uploaded in case you want to print them.

  • Day 1
    • Introduction to R Studio
      We will use the R Studio of the CRG server (http://rstudio.linux.crg.es). We will go through what can be done with R Studio, from file and folder manipulation/navigation, to getting help on R functions.
    • Paths / directories
    • Basics of R: syntax, create an object, manipulate the object, simple arithmetics.
    • Functions usage in R
      Arguments. Get help.
    • R scripts: write and save commands, run them as a block. Comment code.
    • Data types.
    • Data structures:
      • Vectors
        Basic (and most important) data structure in R. We will learn how to create, modify, subset, manipulate, compare vectors.
      • Introduction to factors: categorical vectors.

Slides day1
Exercises day 1 (1, 2 & 3)
Correction of exercises:



  • Day 2
    • Missing values: how to deal with NA values.
    • Matrices & data frames
      2-dimensional objects: how to create, subset, select, manipulate.

Slides day2
Exercises day 2 (4 & 5)
Correction of exercises:


  • Day 3
    • Input / output
      Reading in and writing out files. Adapting I/O to file format.
    • Library / packages
      Install and load packages. Look for functions in those packages.

Slides day3
Exercises day 3 (6 & 7)
Correction of exercises:


  • Day 4
    • Basic plotting (base graphics package)
      Scatter plots, boxplots, barplots, pie plots, histograms.
    • Introduction to ggplot2 package
      ggplot2 provides functions for creating and customizing plots. We will learn the basic structure and how to produce simple plots.
    • Input / output
      We will save plots as files in different formats, both from R Studio and from the terminal.

Slides day4
Exercises day 4 (8 & 9)
Correction of exercises:

Resources

Bioinformatics Core Facility @ CRG — 2011-2024