HPBBM2023
  • Home
  • Course Contents
    • R1: Variables, Operators and data structures
    • R2: Flow Control
    • R3: Read and write data in R
    • R4: Functions in R
    • R5: Base plots in R
    • R6: Advanced data management
    • R7: Project management for reproducible research in R
    • R8: Plot your data in R - Episode II
    • R9: R for Molecular Biology

On this page

  • Wellcome & Disclaimer
  • Bibliography and Resources
  • Contents

HPBBM2023

R
RStudio
Data analysis
R for Biochemists
Authors
Affiliation

Modesto

Department of Biochemistry, UAM

Luis

Department of Biochemistry, UAM

Published

May 30, 2023

Modified

November 13, 2023

There are only two kinds of programming languages: the ones people complain about and the ones nobody uses. —Bjarne Stroustrup

Wellcome & Disclaimer

Under construction, note that it can be updated during the Course

Logo generated with hexSticker package.1

This site contains the materials for the Coding tools for Biochemistry & Molecular Biology (Herramientas de Programación para Bioquímica y Biología Molecular, a.k.a. HPBBM) course of fall 2023 in the Bachelor’s Degree in Biochemistry @UAM (Universidad Autónoma de Madrid, Spain). Source files are available at the repo, containing the source files and the data used in the examples and exercises. The icon on the top-right corner in all the site pages will allow you to download the repo data folder (link generated with DownGit). Note that this folder can be updated during the course. For reference, materials from 2022 course edition are available in the HPBBM2022 site.

Course Syllabus can be checked at UAM site and a PDF version is available here. The course contains a first block of lessons on Python programming (Lessons 1-7) that is not included here. Detailed academic information about the course contents, dates, and assessment only can be found at the UAM Moodle site. In this site, the lessons pages have been generated as Quarto to obtain source files (.qmd) that contain formatted text and chunks of R code that are executed upon rendering (see lesson R7 for more info about Markdown and Quarto in RStudio).

How to use this site

These materials have been designed as an interactive and self-learning resource. As you go through the lessons, think about the code beforehand and then test it with your computer. Then try out the exercises for yourself.

For further examples or additional help, you can consult the references and, of course, ask the lecturers in the meetings and lectures on site.

Update R and RStudio

All the Lessons contain a final R Session info where you can see the used versions for R and all packages. Anyway, espacially if you installed R in your computer for the first time some years ago, I kindly request to update R and RStudio before going forward.

Lessons also contain embedded interactive short exercises (generated with learnr y/o webexercises packages). Try them before checking the proposed solution. Also, we included a final section of Review exercises, some of them from freely available online solved exercises and others that we created. The answers to the latter are not available online, but I’ll be glad to provide them upon request.

All this material is open access and it is shared under CC BY-NC license.

This is a draft version of this site, but it is intended to be expanded and corrected throughout the next weeks and new versions will be available the following years. Any feedback, help, or suggestions will be very warmly welcome.

Also, it is likely that you find some mistypes or even some big mistakes throughout these course materials. I, and the future students, will appreciate it if you let me know about anything that could be corrected or just improved. You can reach us by email.

Bibliography and Resources

Each lesson contains its own specific references, but we wanted to highlight here some curated general open access and open source resources to introduce yourself into R and R Studio.

  • Grolemund, G. Hands-on Programming in R.

  • Peng, R. D. R Programming for Data Science.

  • Coulatti, R. I. R Crash Course for Biologist.

  • Chang, W. R. R Graphics Cookbook.

  • Doyle, M., Chung, J. & Perreau V. Introduction to R for Biologists.

  • Learn R by example

  • R base cheatsheet

  • R programming 101 @YouTube

  • Higgins, P. D. R. Reproducible Medical Research with R.

Contents

Lesson R1: Variables, Operators and data structures in R

Lesson R2: Flow Control

Lesson R3: Data input and output in R

Lesson R4: Write your own functions

Lesson R5: Plots

Lesson R6: Data management

Lesson R7: R-projects and R-markdown for reproducible data analysis

Lesson R8: Advanced data plotting with ggplot

Lesson R9: Applications for Molecular Biology

Footnotes

  1. See the code in the script r_sticker.R in the repo.↩︎

Modesto Redrejo Rodríguez & Luis del Peso, 2023