Reputation: 69
I have a dataset similar to the following and I want to categorise my values in high/medium/low based on percentiles. I use the following but I am confused about the 99% and the values above this value.
data(iris)
quantile(iris$Petal.Length, probs = 0.01)# all the values less than 1.149 are low
quantile(iris$Petal.Length, probs = 0.99)# here must be the high-values category
questions:
Upvotes: 0
Views: 201
Reputation: 1085
To make this more clear, here is a graph that shows the 5. and the 95. percentile of body hieght in human. It was assigned to three categories as in your example.
Upvotes: 1