generatePseudoGaussianSpectrum: Generate the points from a pseudo Gaussian Spectrum.

Description Usage Arguments Value Author(s) Examples

View source: R/utilities.R

Description

Given the locations and intensities of peaks, generate the data points of pseudo gaussian spectrum.

Usage

1

Arguments

x

A numric vector: the locations of the peaks.

y

A numeric vector: the intensities of the peaks.

sd

A numeric value: the standard deviation of the pseodo gaussian distribution. It controls the wideness of the distribution.

xlim

The desired range of simulated data points.

Value

A data.frame of coordinates and intensities.

Author(s)

Yang Yang

Examples

1
2
3
4
5
6
7
8
9
set.seed(1)
## The x-coordinates of peaks
x <- c(100, 200, 350, 400, 550, 600, 800)
## The intensities of peaks
y <- sample(1:100, size=length(x))
## Generate the points of pseudo gaussian spectrum of peaks
ans <- generatePseudoGaussianSpectrum(x, y, sd=5, xlim=c(1,1000))
## Plot the pseudo gaussian spectrum
plot(ans$x, ans$y, type="l")

Yang0014/glycoNativeMS documentation built on March 14, 2021, 11:22 p.m.