Answered Same DayFeb 02, 2021

Answer To:

Sanchi answered on Feb 03 2021
137 Votes
QUESTION 1
a) Provide the mean value of the variable ‘casual’ for each day of the week
Solution:

> library('dplyr')
> df <- read.csv("C:\\Users\\sanchi.kalra\\Desktop\\Greynodes\\AS_8\\Bike-Sharing-Dataset\\day.csv", header = TRUE)
> x <- df %>%
+ group_by(weekday) %>%
+ summarise( casual_mean = mean( as.numeric(as.character(casual)) ) )
b) Plot the conditional density plot of the variable “casual” conditional on each of the year ( consider T as 2012 and E as 2011)
> library('dplyr')
> df <- read.csv("C:\\Users\\sanchi.kalra\\Desktop\\Greynodes\\AS_8\\Bike-Sharing-Dataset\\day.csv", header = TRUE)
> print(is.factor(df$yr))
> df$yr <- factor(df$yr, labels=c("E", "T"))
> p <- cdplot(df$yr ~ df$casual)
c)
> install.packages("lattice")
>...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here