label the x-axis with the days following the proper order from monday to friday


Sagot :

Answer:

I have below dataset. As you can see I have some quantitative for two weeks and Id like to make a comparison between their days ( i.e: Monday 09 with Monday 10 ):

week date day n

(chr) (date) (chr) (int)

1 Week 09 2016-02-29 Monday 5535

2 Week 09 2016-03-01 Tuesday 7497

3 Week 09 2016-03-02 Wednesday 8658

4 Week 09 2016-03-03 Thursday 6113

5 Week 09 2016-03-04 Friday 4553

6 Week 09 2016-03-05 Saturday 2

7 Week 10 2016-03-07 Monday 5339

8 Week 10 2016-03-08 Tuesday 6196

9 Week 10 2016-03-09 Wednesday 5395

10 Week 10 2016-03-10 Thursday 5633

I got below code, but days are unordered.Is there anyway I can order these days in chronological order:

ggplot(data = my_data, aes(x = as.factor(x = day),

y = n,

col = week,

group = week)) +

geom_line() +

geom_point()

Step-by-step explanation:

hope it help:):)