Learn R Programming

clugenr (version 1.0.4)

clupoints_n: Create points from their projections on a cluster-supporting line

Description

Each point is placed around its projection using the normal distribution (=0μ=0, =σ= lat_disp ).

Usage

clupoints_n(projs, lat_disp, line_len, clu_dir, clu_ctr)

Value

Generated points (p np x n matrix).

Arguments

projs

Point projections on the cluster-supporting line (p np x 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".

Examples

Run this code
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(proj, 0.01, NA, dir, NA)

Run the code above in your browser using DataLab