[R] R-help Digest, Vol 203, Issue 8
he|mut@@chuetz @end|ng |rom beb@c@@t
Thu Jan 9 12:20:52 CET 2020
r-help-request using r-project.org wrote on 2020-01-09 12:00:
> Date: Wed, 8 Jan 2020 12:09:55 +0100
> From: Hans W Borchers <hwborchers using gmail.com>
> To: R help project <r-help using r-project.org>
> Subject: [R] Which external functions are called in a package?
> NB: `trapz`, ie.
> the trapezoidal integration formula, seems to be the numerical
> function to be missed the most in R base.
In R base indeed. However available in Frank Harrels Hmisc as the
function trap.rule(x, y) for sorted values.
In plain R: function(x, y) sum(diff(x) * (y[-1] + y[-length(y)]))/2
Ing. Helmut Schütz
BEBAC – Consultancy Services for
Bioequivalence and Bioavailability Studies
1070 Vienna, Austria
More information about the R-help