Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

# Replace VARIABLE1 and VARIABLE2 with different factor variables. Copy and paste as needed. # ggplot (data = data.all, aes( * = VARIABLEi, y =

image text in transcribed
# Replace VARIABLE1 and VARIABLE2 with different factor variables. Copy and paste as needed. # ggplot (data = data.all, aes( * = VARIABLEi, y = bikes_per_hour, fill = VARIABLE2 )) + geom_boxplot (alpha = 0.5) + theme (axis . text . x = element_text (angle = 90, vjust = 0.5)) ggplot (data = data. all, aes( x = as . factor (hour ), y = bikes_per_hour, fill = holiday )) + geom_boxplot (alpha = 0.5) + theme (axis . text . x = element_text (angle = 90, vjust = 0.5)) > Stronger candidates use reasonably simple R coding to go beyond the templates given by the assistant and provide examples that will clarify their line of thinking. While this uses dplyr syntax for convenience, base R commands to get the same figures are straightforward and fairly quick. # Example to make the interaction more clear "*{r} # Gathering statistics, first all data . all #3% group_by_( "holiday") %>% summarise( mean = mean (bikes_per_hour), median = median (bikes_per_hour), n = n() # Now just hours 5-9 data . all #3% filter (hour >= 5 & hour >% group_by_ ( "holiday") %>% summarise( mean = mean (bikes_per_hour), median = median (bikes_per_hour), n = n() # Now just hours 10-14 data . all #3% filter (hour >= 10 & hour % group_by_( "holiday") *>% summarise( mean = mean (bikes_per_hour), median = median (bikes_per_hour), n = n()

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Entrepreneurship

Authors: Andrew Zacharakis, William D Bygrave

5th Edition

9781119563099

Students also viewed these Mathematics questions