Skip to content
Back to formatted view

Raw Message

Message-ID: <Pine.A41.4.33.0107100801160.15808-100000@homer18.u.washington.edu>
Date: 2001-07-10T15:02:05Z
From: Thomas Lumley
Subject: returning quartiles of a list?
In-Reply-To: <15179.5340.312018.398067@viz.itd.nrl.navy.mil>

On Tue, 10 Jul 2001, Greg Trafton wrote:

> Hi, all.  I have a list:
>
> process <- c( 5 , 7 , 4 , 1 , 4 , 1)
>
> and I'd like to get each half (or each third or each quartile) of the list:
>

n<-length(process)
process[1:(n/2)]
process[(n/2):1]
process[(n/4):(n/2)]
etc, etc,


	-thomas


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._