Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

trapzc

Trapezoidal formula for numerical integration


Description

Numerical integration via trapezoidal formula.

Usage

trapzc(step, f)

Arguments

step

step of the grid

f

grid evaluation of density

Value

int

The value of integral computed numerically by trapezoidal formula.

Author(s)

Examples

# 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

Compositional Data Analysis

v2.3.0
GPL (>= 2)
Authors
Matthias Templ [aut, cre] (<https://orcid.org/0000-0002-8638-5276>), Karel Hron [aut] (<https://orcid.org/0000-0002-1847-6598>), Peter Filzmoser [aut] (<https://orcid.org/0000-0002-8014-4682>), Kamila Facevicova [ctb], Petra Kynclova [ctb], Jan Walach [ctb], Veronika Pintar [ctb], Jiajia Chen [ctb], Dominika Miksova [ctb], Bernhard Meindl [ctb], Alessandra Menafoglio [ctb] (<https://orcid.org/0000-0003-0682-6412>), Alessia Di Blasi [ctb], Federico Pavone [ctb], Gianluca Zeni [ctb]
Initial release
2020-11-18

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.