I have an excel file which has two columns, the first one is for customers and the second is the revenue generated from them. Let's say that my total revenue is 1000. I need to divide this total revenue in 5 buckets, i.e, 20% of total revenue(0-200), 40% of total revenue(200-400), 60% of total revenue(400-600), 80% of total revenue(600-800) and 100% of total revenue(800-1000). I want to count the number of customers within each bucket ranges, for example, how many customers lie in the range where sum of revenue<20% of total revenue and so on for other ranges and finally plot them using a bar graph. How can I do this in R? Below is a sample data:
Customer Revenue
a 230
b 170
c 809
d 435
e 678
f 350
g 465
h 990
i 767
j 500