Question 4
bike_sharing <- read.csv("bike_sharing_data.csv")
bike4 <- read.delim("bike_sharing_data.txt")
bike2 <- read.table("bike_sharing_data.txt", sep="\t", header=TRUE)
bike3 <- read.table("bike_sharing_data.csv", sep=",", header=TRUE)
Question 5
dim(bike_sharing)
## [1] 17379 13
Question 6
class(bike3$humidity)
## [1] "character"
Question 7
bike3[6251, "season"]
## [1] 4
Question 8
table(bike3$season)
##
## 1 2 3 4
## 4242 4409 4496 4232
sum(bike3$season ==4)
## [1] 4232
Question 10
sum(
bike_sharing$windspeed >= 40 &
bike_sharing$windspeed <= 57 &
bike_sharing$season %in% c(1, 4)
)
## [1] 46