trapzc: Trapezoidal formula for numerical integration

Description Usage Arguments Value Author(s) Examples

View source: R/Transformations.R

Description

Numerical integration via trapezoidal formula.

Usage

1

Arguments

step

step of the grid

f

grid evaluation of density

Value

int

The value of integral computed numerically by trapezoidal formula.

Author(s)

R. Talskatalskarenata@seznam.cz, K. Hronkarel.hron@upol.cz

Examples

1
2
3
4
5
6
7
# Example (zero-integral of fcenLR density)
t = seq(-4.7,4.7, length = 1000)
t_step = diff(t[1:2])
mean = 0; sd = 1.5
f = dnorm(t, mean, sd)
f.fcenLR = fcenLR(t,t_step,f)
trapzc(t_step,f.fcenLR)

robCompositions documentation built on Jan. 13, 2021, 10:07 p.m.