peakFit: Fit G1 and G2 peaks

Description Usage Arguments Details Value

View source: R/peakFit.R

Description

Fit an arbitrary number of Gaussian peaks.

Density distribution function for multiple Gaussian function of given means ('mean') and standard deviations ('sd'), each adjusted by the multiplier 'lambda' where 'sum(lambda) = 1'.

This is a simpler version of [stats::dnorm] and runs a little faster.

Usage

1
2
3
4
5
peakFit(x)

mgfun(x, mean, sd = 0.05 * mean, lambda = 1/length(mean))

gfun(x, mean, sd)

Arguments

x

Numeric values at which to evaluate the function

mean

Mean value for the Gaussian distribution

sd

Numeric value of standard deviation (sigma) for Gaussian function

lambda

Numeric vector serving as the multiplier for the relative area of each Gaussian component with a default value of '1/length(mean)' for each. The value will be adjusted to 'lambda/sum(lambda)' to permit a value such as 'c(2, 5)' to express the relative **area** of each peak.

Details

Currently a stub for the peakFit function.

Value

Echo argument

The combined Gaussian density for given 'x' values and parameters

The Gaussian density for given 'x' values


ornelles/flowExtra documentation built on March 1, 2020, 9:33 a.m.