liveBook · Manning

R

As explained in Statistics Slam Dunk

R is a free, open-source programming language and environment for statistical computing, data analysis, and visualization.

R is a free, open-source programming language for statistical computing, data analysis, visualization, and machine learning. It is used to turn raw, often messy data into evidence for decisions: import and wrangle data, explore patterns, test hypotheses, fit models, and communicate results with charts and reports. section 1.0 section 1.4

R work commonly happens through packages, which extend the language with specialized functions. A practical workflow starts by installing and loading packages, then writing a script to prepare data, run an analysis, inspect outputs and warnings, and interpret findings. Base R supplies functions immediately after installation; packaged functions add much of the data-wrangling and visualization toolkit. section 1.3 section 1.1

Figure 1.1 A snapshot of the RStudio interface. Code is written in the upper-left panel; programs run in the lower-left panel; the plot window is in the lower-right panel; and a running list of created objects is in the upper-right panel. Through preferences, you can set the background color, font, and font size.
CH01_F01_Sutton

RStudio is a free IDE that runs an R session. Its Script Editor is for code, Console for output and errors, Plot window for graphics, and Environment window for created objects such as data frames and visualizations. section 1.1

R supports an end-to-end analytical workflow:

  • Prepare real-world web data by importing, cleaning, reshaping, and otherwise wrangling it before analysis. section 1.0 section 1.3
  • Explore and explain results with statistical tests, predictive or unsupervised-learning methods, and visualizations. section 1.0 section 1.4
  • Work as an analytics layer alongside big-data technologies including Hadoop, Apache Kafka, and Apache Spark. section 1.2.4

Visualizing automobile data

The built-in mtcars data set contains 32 automobile models and 11 variables. With ggplot2 and patchwork, R can combine a correlation plot, faceted boxplots of miles per gallon, a bar chart, and a histogram into one display. The plots make relationships, grouped distributions, and frequencies easier to inspect than a table alone. section 1.2.1

A project can begin with a question or hypothesis, then move through package loading, data preparation, visualization or statistical analysis, and an interpretation of whether the evidence supports the initial expectation. This approach treats R code as part of a complete investigation rather than an isolated technique. section 1.3 section 1.0

How Statistics Slam Dunk covers it

How deep it goes
Introduces installation, RStudio operation, packages, scripts, outputs, and project workflow without detailing language internals.
Examples
Demonstrates ggplot2 and patchwork on mtcars through correlation, facet, bar, and histogram plots.
What it assumes
Teaches setup and workflow from installation onward while using plain-language introductions to analytical tasks.
What you can do after
Apply it via RStudio and packages to prepare data, run analyses, inspect outputs, and produce visual reports.
How it connects
Connects R with RStudio, packages, data wrangling, statistical hypothesis testing, visualization, supervised learning, and unsupervised learning.

Also explained in

Compare how 2 books explain R →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Statistics Slam Dunk. The section links point to the parts of the book it draws on.