Skip to contents

given a range of values, find the max value just before a percentile, say 1% , used to divide a range into two bins or set an upper limit. If a whole number is sent, the percentiles are sequenced by 1% (0, 1..98, 98, 100) Ff a non-whole number is sent like 2.25% or 0.25% then the percentiles are divided into finer resolution (e.g per 0.25%)

Usage

percentile_cutoff_value(x, cut_percent = 1)

Arguments

x

values to find the cut-off in, numeric vector

cut_percent

numeric top percent to cut e.g. 1 to cut top 1% See description should be 0<x<100 and can be decimal

Value

numeric value in x that is the max befoe the percentile indicated by cut_percent