clustersim: Simulate clusters of marks on an RCP background point...

View source: R/rapt_cluster-sim.R

clustersimR Documentation

Simulate clusters of marks on an RCP background point pattern.

Description

clustersim simulates point clusters using two RCP point clouds. The first point cloud is the "underlaying" pattern. This is the set of points that will be used as actual cluster point locations in the resultant marked point pattern. The second point cloud is the "overlaying" pattern. This is the set of points that will be scaled to determine the positions of the cluster centroids within the underlying point pattern.

Usage

clustersim(
  under,
  over,
  rcp_rad,
  pcp = 0.1,
  cr,
  rho1,
  rho2,
  rb = 0.1,
  pb = 0.1,
  tol = 0.005,
  s = 103,
  toplot = FALSE
)

Arguments

under

The underlying RCP point pattern (UPP). A pp3 object containing points at the centers of RCP spheres.

over

The overlying RCP pattern. A pp3 object containing points at the centers of RCP spheres. Scaled equal to the underlying point pattern.

rcp_rad

The radius of the spheres within the underlying and overlying RCP patterns.

pcp

The fraction of type-A (clustering) points within the UPP. A decimal value between 0 and 1.

cr

Mean cluster radius. Any value larger than zero.

rho1

Intra-cluster type-A point concentration. A decimal value between 0 and 1.

rho2

Background type-A point concentration. A decimal value between 0 and the value of pcp.

rb

Radius blur. A decimal value between 0 and 1.

pb

Position blur. A decimal value between 0 and 1.

tol

Tolerance value for pcp. The true fraction of type-A points in the pattern will be within this tolerance of the value specified by the pcp parameter. If not, function will return NULL.

s

Random seed for the simulation.

toplot

Show a 3D plot of the cluster points once generation is done? TRUE or FALSE (the default).

Value

List of:

  • clusters - A pp3 object containing the final locations of only type-A points within all.

  • all - A pp3 object containing the full marked underlying point pattern with points marked as either type A (cluster type point in a cluster), B (cluster type point not in a cluster) or C (non-cluster type point).

  • radii - A vector containing the simulated radius of each cluster in all.

  • perc - A single value containing the true fraction of type-A points in all.

  • centers - A pp3 object containing the cluster center locations within all.

See Also

Other simulation functions: lattice(), makecluster(), morph_lamellar(), morph_rods(), nmers(), read.rcp(), scaleRCP(), stitch.size()


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