func_expGaussian: Calculate an Exponentially Modified Gaussian Probability...

Description Usage Arguments Value Examples

View source: R/PeakFunctions_func_expGaussian.R

Description

Calculate an Exponentially Modified Gaussian Probability Density or Peak

Usage

1
func_expGaussian(x, mu, sigma, lambda, probDensity = TRUE, k)

Arguments

x

a vector of x-coordinates from which the corrisponding y-coordinates are calculated

mu

the mean of the gaussian component

sigma

the standard deviation of the gaussian component

lambda

rate parameter of the exponential component

probDensity

Should the function return a probability density 'TRUE' or an exponentially modified gaussian peak 'FALSE' with amplitude k? default is 'TRUE'.

k

Amplitude of the gaussian peak. Only used when 'probDensity == TRUE'

Value

a vector of y-coordinates the same length as x

Examples

1
2
3
4
5
6
7
8
#Probability density of exponentially modified gaussian
xVec <- seq(from = 1, to = 100, by = 0.1)
pdist <- func_expGaussian(x = xVec, mu = 10, sigma = 1, lambda = 0.2, probDensity = TRUE)
plot(x = xVec, y = pdist)

#Exponentially modified gaussian peak
gpeak <- func_expGaussian(x = xVec, mu = 10, sigma = 1, lambda = 0.2, probDensity = FALSE, k = 10)
plot(x = xVec, y = gpeak)

pmbrophy/SummitR documentation built on May 20, 2020, 12:36 a.m.