View source: R/z_projections.R
Atomize | R Documentation |
Produce noise to be added to numeric values
Atomize(n, spray = c("uniform", "triangle", "cosine", "normal"), fwhm = 1/2)
n |
number of pseudo random values to generate. |
spray |
defines the distribution used to generate noise values.
This can be either |
fwhm |
positive numeric value defining the Full Width at Half Maximum of the normal
distribution used when |
Atomize
returns a numeric vector of length n
with values
centered at 1/2 and strictly within [0 ; 1] when using the uniform, triangle
or cosine distributions.
UnivariateProjection, BivariateProjection
## Not run:
layout(matrix(1:8, 2, 4, byrow = TRUE))
par(pch = ".", col = grey(0, 0.2))
lst <- c("uniform", "triangle", "cosine", "normal")
n <- 10000
x <- y <- rep(1:4, length.out = n)
for(j in lst) {
u <- x + Atomize(n, spray = j) - 0.5
v <- y + Atomize(n, spray = j) - 0.5
plot(u, v, main = j)
}
par(pch = 20, col = grey(0, 0.5))
n <- 25000
for(j in lst) {
x <- Atomize(n, spray = j)
d <- ASH1D(x, k = 10)
plot(x, d, main = j, xlim = c(-0.5, 1.5))
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.