R
Installation
Normal Setup
R must be installed before installing RStudio
OR
Development Setup for Compling Packages (Extra)
Using R Online
NYU Virtual Computing Lab (NYU Login Needed)
- Uses Windows
Posit Cloud (Free and Academic Pricing Available)
- Uses Ubuntu Linux
GitHub Education gives access to Codespaces
Publishing
Quarto should be downloaded as a binary from its website for installation.
Exporting (Knitting) from RMarkdown or Quarto requires a LaTeX installation.
Easy method (Works in most cases)
Advanced (Works in all cases, but difficult to manage)
Videos
Handouts
External Resources
R
An Introduction to R (2024) — Good Starting Place
Posit Cheatsheets (RStudio)
Best Coding Practices for R (2022)
- Chapter 3 Code Structure
R for Graduate Students (2019)
- Chapter 3.6 Troubleshooting Errors
Working Directories and Workspaces in the RStudio IDE — Posit
R-Bloggers (Blog about R)
- RStudio Keyboard Shortcuts — RBloggers
R Courses
Datacamp (Free Access with Github Student Developer Pack)
RMarkdown
Posit Documentation on RMarkdown
- RMarkdown uses Pandoc’s implementation of Markdown.
R Markdown: The Definitive Guide (2023)
- More Advanced: R Markdown Cookbook (2024)
Regular Expressions
Regular Expressions Cheat Sheet — maketecheasier
Related regex information in R for Data Science (2e) book.
Regular Expressions (RegEx) in 100 Seconds— Fireship on YouTube
Data Types
Vector
Dimensions: 1D
Homogeneous?: Yes
Key use case: Basic data storage
List
Dimensions: 1D (nested possible)
Homogeneous?: No
Key use case: Collection of various data types
Matrix
Dimensions: 2D
Homogeneous?: Yes
Key use case: Mathematical operations
Data Frame
Dimensions: 2D
Homogeneous?: No (columns can be different)
Key use case: Tabular data analysis
Array
Dimensions: 2D or more
Homogeneous?: Yes
Key use case: Multi-dimensional data
Miscellaneous
DAGitty for Directed Acyclic Graphs
Styling code using Tidyverse style guide with styler package.
See also lintr for error checking.
styler can be used before lintr to reduce errors marked.
lintr can set a style guide using the command lintr::use_lintr(type = “tidyverse”)