Question 1

No R code Required

Question 2

No R code Required

Question 3

No R code Required

Question 4: All Options Work

bike2 <- read.table("bike_sharing_data.txt", sep="\t", header=TRUE)
bike1 <- read.table("bike_sharing_data.csv", sep=",", header=TRUE)
bike3 <- read.csv("bike_sharing_data.csv")
bike4 <- read.delim("bike_sharing_data.txt")

Question 5: Observations and Variables

dim(bike1)
## [1] 17379    13

Question 6: Humidity

class(bike4$humidity)
## [1] "character"

Question 7: Value of Season

bike1[6251, "season"]
## [1] 4

Question 8: Winter Observations

table(bike1$season)[4]
##    4 
## 4232

Question 9

#No R code needed

Question 10

library(readr)
## Warning: package 'readr' was built under R version 4.5.2
bike_sharing_data <- read_csv("bike_sharing_data.csv")
## Warning: One or more parsing issues, call `problems()` on your data frame for details,
## e.g.:
##   dat <- vroom(...)
##   problems(dat)
## Rows: 17379 Columns: 13
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr  (2): datetime, sources
## dbl (11): season, holiday, workingday, weather, temp, atemp, humidity, winds...
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
sum(
  bike_sharing_data$windspeed >= 40 &
  bike_sharing_data$season %in% c(1, 4)
)
## [1] 46