[R] removing lower and upper quantiles from an arry
Maas James Dr (MED)
J.Maas at uea.ac.uk
Thu Feb 17 11:08:52 CET 2011
I'm trying to work out the simplest way to remove the upper and lower quantiles, in this case upper and lower 25% from an array. I can do it in two steps but when I try it in one, it fails. Is there something simple missing from my syntax or are there other simple elegant way to accomplish this?
Thanks
J
> i <-1:20
> i2 <- i[i<quantile(i,.75)]
> i3 <- i[i>quantile(i,.25)]
> i4 <- i[quantile(i,.25)< i > quantile(i,.75)]
Error: unexpected '>' in "i4 <- i[quantile(i,.25)< i >"
===============================
Dr. Jim Maas
University of East Anglia
More information about the R-help
mailing list