Skip to content

bigest part of vector

1 message · Mark Leeds

#
There's probably something built in to R but you can change the values 
of the percentiles (p) below to get the value that corresponds to it. 
rounding might be problematic also.

temp <- c(1,4,8,3,5)
p <- 0.8
temp[order(temp)][round(length(temp)*p)]
On Tue, Feb 24, 2009 at 2:36 PM, Peterko wrote: