Is this what you want:
> myData <- rnorm(1000)
> length(myData)
[1] 1000> top90 <- quantile(myData, prob = 0.9)
> low90 <- myData[myData < top90]
> length(low90)
[1] 900>
>
Jim Holtman
Data Munger Guru
What is the problem that you are trying to solve?
Tell me what you want to do, not how you want to do it.
On Thu, Apr 24, 2014 at 10:55 AM, Nasrin Pak <astronasrin@gmail.com>
wrote:
> Hi all;
>
> I have a data set that I want to remove the top values above 90th
> percentile from it. Any suggestions?
>
> Thank you;
>
> --
>
> *Nasrin Pak, MSc*
>
> Air Quality Scientist
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
[[alternative HTML version deleted]]