I´m trying to compare 2 values but before I have to create the intervals. I have no problem with the constant interval, I can go with this:
interval <- seq(4, 44055, by=300)
So I get the same interval from 4 to 44055 with a 300 size.
But I can´t get the value for a different interval. I need to have an interval from 4 to 200, an interval from 201 to 20000 and the last one from 20001 to 44055.
I have the mean of each interval, so I created an interval for each case (int4 <- cut(1,200,by = 5)
.
But here´s the problem, it says that x
and y
lengths differ so I cannot get the histograms and the dispersion data. How can I get the the histograms and the dispersion data?
This is the data:
1269.83 - 1
338 - 1
1238 - 2
272 - 1
1925 - 2
382 - 8
So I need to divide in 3 groups: one from 1 to 2 elements one from 3 to 7 and the last one with the 8 and beyond (right column, number of salesman). When I get it, I have to make the histograms with the 3 groups against the left column (sales)