func_arbGaussian: Calculate Normal Distribution or Gaussian Peak

Description Usage Arguments Value Examples

View source: R/PeakFunctions_func_arbGaussian.R

Description

Calculates either a normal distribution similar to [dnorm()] with an integrated area of 1 or a gaussian peak with amplitude k

Usage

1
func_arbGaussian(x, mu, sigma, probDensity, k, weights)

Arguments

x

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

mu

the mean

sigma

the standard deviation

probDensity

Should the function produce a probability density function 'TRUE' or a gaussian peak 'FALSE' with amplitude k? default is 'TRUE'.

k

Amplitude of the peak. Only used when 'probDensity == FALSE'

weights

weighting vector to augment the gaussian shape profile

Value

a vector of y-coordinates the same length as x

Examples

1
2
3
4
5
xVec <- seq(from = 1, to = 100, by = 0.1)
weights <- rep(x = 1, times = length(xVec))
weights[490:510] <- 0.1
pdist <- func_arbGaussian(x = xVec, mu = 50, sigma = 1, probDensity = TRUE, weights = weights)
plot(xVec, pdist)

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