bike1 <- read.csv("bike_sharing_data.csv")
bike2 <- read.delim("bike_sharing_data.txt")
bike3 <- read.table("bike_sharing_data.csv", sep=",", header=TRUE)
bike4 <- read.table("bike_sharing_data.txt", sep="\t", header=TRUE)
# Q5 What is the total number of observations and variables for the bike sharing dataset?
dim(bike1)
## [1] 17379 13
# Q7 What is the value of season in row 6251?
bike1 [6251, "season"]
## [1] 4
# Q8 How many observations have the season as winter?
table (bike1$season) [4]
## 4
## 4232
# Q10 How many observations having "High" wind thread condition or above during winter or spring?
sum(bike1$season %in% c(1,4) &
bike1$windspeed >= 40)
## [1] 46