1.1 Things you should know about R
- R is free & open-source.
- R is expert in data analysis & statistical computing.
- R is an interpreted, dynamically typed programming language, just like Python.
- Procedural programming is more common when using R - although R supports object-oriented programming.
- Strong supports from lots of user-created packages - ggplot2 for graphing, tidyverse for data manipulation...
- RStudio is an IDE for R which can make using R much easier.
- Rstudio does not come with a R software - you should install R first.
1.2 Installing R
brew install r
or download from a mirror: https://cran.r-project.org/mirrors.html
1.3 Installing RStudio
Free version: https://posit.co/downloads/
RStudio cheat sheet: https://ucdavis-bioinformatics-training.github.io/Oct2017-ILRI-Workshop/Cheat_Sheets/rstudio-IDE-cheatsheet.pdf
It is a good habit to create a new project for each different research problem. There are some important windows:
- Environment: Defined variables and functions.
- History: Commands history.
- Files: All files in the current working directory.