Summary

This document explores two classic built-in R datasets, pressure and cars, to demonstrate basic data visualization and tabular summarization in R Markdown. The pressure dataset shows the relationship between temperature and vapor pressure of mercury, while cars records stopping distances for vehicles at various speeds. Together, these examples highlight how R Markdown can combine narrative text, code, and output into a single reproducible report. The document is styled using the prettydoc package for a cleaner visual theme.

Key Points

Plot: Pressure Dataset

plot(pressure$temperature, pressure$pressure,
     main = "Vapor Pressure of Mercury vs Temperature",
     xlab = "Temperature (Celsius)",
     ylab = "Pressure (mm of Mercury)",
     col = "steelblue", pch = 19)

Table: Top 6 Rows of Cars Dataset

knitr::kable(head(cars), caption = "First 6 rows of the cars dataset")
First 6 rows of the cars dataset
speed dist
4 2
4 10
7 4
7 22
8 16
9 10