Integrates the peak model over a given range to calculate the area.
Details
For models with analytical integrals (e.g., Gaussian), this can return an exact value. Otherwise, numerical integration is used.
Examples
model <- create_peak_model("gaussian")
params <- list(height = 1, center = 5, width = 1)
area <- peak_model_area(model, params, c(0, 10))
area
#> [1] 2.506628