trap.rule <- function(x,y) sum(diff(x)*(y[-1]+y[-length(y)]))/2
On Wed, 29 May 2002 12:03:39 -0700
Alesia Ferguson <afer@stanford.edu> wrote:
> Using S-plus 6 on Windows ME
>
> I looking for an equivalent function to trapz() found in Matlab to
> implement in S-plus 6
>
> Thank you
> Alesia
>
> --------------------------------------------------------------------
> This message was distributed by s-news@lists.biostat.wustl.edu. To
> unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
> the BODY of the message: unsubscribe s-news
--
Frank E Harrell Jr Prof. of Biostatistics & Statistics
Div. of Biostatistics & Epidem. Dept. of Health Evaluation Sciences
U. Virginia School of Medicine http://hesweb1.med.virginia.edu/biostat
|