Create points from their projections on a cluster-supporting line
Source:R/module.R
clupoints_n_1.Rd
Each point is placed on a hyperplane orthogonal to that line and centered at
the point's projection, using the normal distribution (\(\mu=0\),
\(\sigma=\) lat_disp
).
Arguments
- projs
Point projections on the cluster-supporting line (\(p \times n\) matrix).
- lat_disp
Standard deviation for the normal distribution, i.e., cluster lateral dispersion.
- line_len
Length of cluster-supporting line (ignored).
- clu_dir
Direction of the cluster-supporting line.
- clu_ctr
Center position of the cluster-supporting line (ignored).
Details
This function's main intended use is by the main clugen function,
generating the final points when the point_dist_fn
parameter is set to
"n-1"
.
Note
This function is stochastic. For reproducibility set a PRNG seed with set.seed.
Examples
set.seed(123)
ctr <- c(0, 0)
dir <- c(1, 0)
pdist <- c(-0.5, -0.2, 0.1, 0.3)
proj <- points_on_line(ctr, dir, pdist)
clupoints_n_1(proj, 0.1, NA, dir, NA)
#> [,1] [,2]
#> [1,] -0.5 -0.056047565
#> [2,] -0.2 -0.023017749
#> [3,] 0.1 0.155870831
#> [4,] 0.3 0.007050839