Description Usage Arguments Value Examples
View source: R/PeakFunctions_func_expGaussian.R
Calculate an Exponentially Modified Gaussian Probability Density or Peak
1 | func_expGaussian(x, mu, sigma, lambda, probDensity = TRUE, k)
|
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' |
a vector of y-coordinates the same length as x
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.