Question: please solve this using R. Suppose we have the following data about some rate during particular days of the week; day

please solve this using R.

Suppose we have the following data about some rate during particular days of the week; day <- c("Saturday", "Wednesday", "Friday", "Tuesday", "Thursday") rate <- c(42,75,11,35,40) df <- data.frame(day,rate) Now please answer the following questions. a. Convert the day column of dataframe df into a factor column. Demonstrate that it is indeed converted into a factor column. b. Now generate a bar chart showing the rate of different days. c. Notice the order of the levels of day is not natural, instead the plot shows the dictionary order. Now, order the bars according to the natural order of the levels of the class (days of the week as they appear in order) and regenrate the bar graph.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!