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