# Introduction to R## Learning Objectives- **R syntax:** Familiarize the basic syntax and the use of Rstudio.- **Data types and data structures:** Describe frequently-used data types and data structures in R.- **Data inspection and wrangling:** Demonstrate the utilization of functions and indices to inspect and subset data from various data structures.- **Data visualization:** Apply the ggplot2 package to create plots for data visualization.## Installations1. [R](https://cran.r-project.org/) (version 4.4.0 or later) 2. [RStudio](https://posit.co/download/rstudio-desktop/)## Lessons1. [Introduction to R and RStudio](../lessons/01_R-and-RStudio.qmd)2. [R Syntax and Data Structure](../lessons/02_syntax-and-data-structures.qmd)3. [Functions and Arguments](../lessons/03_functions-and-arguments.qmd)4. [Reading in and inspecting data](../lessons/04_reading_and_data_inspection.qmd)5. [Custom functions exercises](../lessons/05_Custom_functions.qmd)6. [Data Wrangling: Subsetting Vectors and Factors](../lessons/06_data-wrangling.qmd)7. [Packages and libraries](../lessons/07_packages.qmd)8. [Data wrangling: data frames, matrices and lists](../lessons/08_data-wrangling-2.qmd)9. [The %in% operator](../lessons/09_identifying-matching-elements.qmd)10. [Setting up a data frame to plot (+ the `map()` function)](../lessons/10_setting_up_to_plot.qmd)11. [Data wrangling exercises](../lessons/11_Data_wrangling.qmd)12. [Plotting with the ggplot2 package](../lessons/12_ggplot2.qmd)13. [Using custom functions for consistent plots](../lessons/13_Custom_Functions_ggplot2.qmd)14. [Generating a boxplot with ggplot2](../lessons/14_boxplot_exercise.qmd)15. [Writing to file and exporting plots](../lessons/15_exporting_data_and_plots.qmd)16. [Finding help](../lessons/16_finding_help.qmd)17. [Tidyverse](../lessons/17_tidyverse.qmd)18. [Tidyverse and Data visualization exercises](../lessons/18_Tidyverse_and_data_visualization.qmd)## Final Exercises- [**Exercises**](../lessons/Additional_practice_Intro_to_R.qmd) + [**Answer Key**](../lessons/Additional_practice_Intro_to_R-Answer_key.qmd)## Building on the basic R knowledge- [DGE workshop](https://hbctraining.github.io/Intro-to-DGE/)- [Single-cell RNA-seq workshop](https://hbctraining.github.io/Intro-to-scRNAseq/)- [RMarkdown](https://hbctraining.github.io/Training-modules/Rmarkdown/)- [Quarto](https://hbctraining.github.io/Training-modules/Quarto/)- [Functional analysis](https://hbctraining.github.io/Training-modules/DGE-functional-analysis/)- [More ggplot2](https://hbctraining.github.io/publication_perfect/)- [ggplot2 cookbook](http://www.cookbook-r.com/Graphs/)- [Running R and Rstudio on O2](https://hbctraining.github.io/BMI714_Intro_to_HPC/schedule/workshop_schedule.html)## Resources- [All hbctraining materials](https://hbctraining.github.io/main)## Cheatsheets- [base R cheatsheet](../lessons/cheatsheets/base-r.pdf)- [RStudio cheatsheet](../lessons/cheatsheets/rstudio-ide.pdf)- [ggplot2 cheatsheet](../lessons/cheatsheets/data-visualization-2.1.pdf)