Reputation: 1704
I need to subset values in a data frame based on their upper 85-95% bin. Does any one know how I can do that?
Upvotes: 0
Views: 1611
Reputation: 60924
You can use quantile
to determine which value is the 85 or 95% bin. Next you can use normal R subset syntax to get only the data above that threshold.
df[df$value > quantile_thold,]
Upvotes: 3