cars_data<-read.csv("cars_data.csv")
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.2.1     ✔ readr     2.2.0
## ✔ forcats   1.0.1     ✔ stringr   1.6.0
## ✔ ggplot2   4.0.3     ✔ tibble    3.3.1
## ✔ lubridate 1.9.5     ✔ tidyr     1.3.2
## ✔ purrr     1.2.2     
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
  1. What is the average (mean()) mpg for all cars?
mean(cars_data$mpg)
## [1] 20.09062
  1. What is the minimum mpg for all cars?
min(cars_data$mpg)
## [1] 10.4
  1. What is the maximum mpg for all cars?
max(cars_data$mpg)
## [1] 33.9
  1. How many cars are there in the dataset? (Hint: length() of mpg)
length(cars_data$mpg)
## [1] 32