I have looked through the answers in this forum but cannot seem to find an answer to this specific problem. I have the following data and want to create a bar chart where th
You want function reorder()
:
breadth_data <- transform(breadth_data,
Stakeholder = reorder(Stakeholder, Value))
Which gives:
If you want them the other way round, an easy way is just to use order()
on Value
inside the reorder()
call:
breadth_data <- transform(breadth_data,
Stakeholder = reorder(Stakeholder,
order(Value, decreasing = TRUE)))