Description Usage Arguments Value Author(s) Examples
Given the locations and intensities of peaks, generate the data points of pseudo gaussian spectrum.
1 | generatePseudoGaussianSpectrum(x, y, sd, xlim = range(x))
|
x |
A |
y |
A |
sd |
A |
xlim |
The desired range of simulated data points. |
A data.frame
of coordinates and intensities.
Yang Yang
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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.