1.1 R: What, why, and how?
1.1.1 What is R? What is RStudio/ Posit Cloud?
R is a statistical programming language that can be used for any data-driven task.
RStudio is a desktop environment for working with R while Posit Cloud is an online version of RStudio.
You can think of R like the underlying computer language on a smartphone and RStudio like the operating system on a smartphone. While R contains the commands and functions you need to solve data-driven tasks, RStudio is a human interface that allows you to run and save R code, view data and plots, access help documents, and much more.
1.1.2 Why use R?
- R is free and open-source
- R is the most extensive set of tools for data science and statistics
- Using R promotes reproducibility
- R is not just for statistics
- Data visualization
- Data manipulation
- Generating reports
- Creating data-driven apps
- Anyone and everyone can benefit from working with R
- R illustrates, communicates, and automates
- R has an expansive and welcoming learning community
1.1.3 Why use RStudio or Posit Cloud?
- RStudio and Posit Cloud are free and can be run on any system
- RStudio is a desktop application and supports offline use
- Posit Cloud allows online access to your projects and offers convenient sharing
1.1.4 How R works
Base R, packages, and functions: A smartphone analogy
- Base R is similar to the factory-installed apps that come standard on a smartphone. This functionality is already built-in when you download R.
- Packages are like additional apps you can download to add functionality to do various tasks (such as an email app adds the ability to receive and send emails). Packages need to be installed once and then loaded each time you need to use it. R has over 10,000 packages and more are being created every day!
- Functions are commands in R that perform a specific function, similar to the way phone apps perform specific tasks.
1.1.5 How to get started with R
- Option 1: Posit Cloud
- If you have regular internet access and want a quick start-up to R that you can use while following this book, I recommend Posit Cloud.
- https://posit.cloud
- If you have regular internet access and want a quick start-up to R that you can use while following this book, I recommend Posit Cloud.
- Option 2: R and RStudio
- If you want to use R but may not always have internet access, download R and RStudio.
- https://posit.co/download/rstudio-desktop/
(Note: RStudio and Posit are the same, but RStudio rebranded in early 2023 as Posit in order to also encompass the Python community)