randomInsert: Helper for 'makecluster' to insert random cluster points

View source: R/rapt_cluster-sim.R

randomInsertR Documentation

Helper for makecluster to insert random cluster points

Description

When pip argument of makecluster is not equal to 1, or superfast == TRUE, there may be random points that need to be marked as cluster type placed within the underlaying pattern. This function does just that.

Usage

randomInsert(cluster.indices, n, N, s, points.avoid = cluster.indices)

Arguments

cluster.indices

A vector containing the indices of the current cluster points

n

The number of points that need to be placed randomly

N

The number of points in the entire underlaying pattern.

s

The seed for the random inserted points.

points.avoid

A vector containing the indices of the points you don't want the function to insert points to.

Value

New indices vector containing new cluster points randomly placed.


aproudian2/rapt documentation built on Dec. 15, 2022, 4:24 a.m.