I am using R for data analysis. I have a data frame that contains data on the steps walked per day by a number of users. My data looks something like this -
User_id | Week_day | Step_count |
---|---|---|
1 | Friday | 5000 |
1 | Saturday | 6000 |
1 | Sunday | 2000 |
1 | Monday | 9000 |
1 | Tuesday | 6000 |
1 | Wednesday | 8000 |
1 | Thursday | 8000 |
2 | Friday | 1000 |
2 | Saturday | 8000 |
2 | Sunday | 8000 |
2 | Monday | 2000 |
2 | Tuesday | 1000 |
2 | Wednesday | 2000 |
2 | Thursday | 2000 |
3 | Friday | 5000 |
3 | Saturday | 8000 |
3 | Sunday | 8000 |
3 | Monday | 5000 |
3 | Tuesday | 5000 |
and so on. Note how the day starts from Friday. Thus it appears to be sorted alphabetically, by day, for each user. I would like to start from Monday for each user. The reason being that when I put this data onto a plot, I would like to start the days from Monday. Please help me achieve this in R. Thank you
I've only tried searching online but haven't found anything to help me do this.