findNearestNeighbourClusters: Cluster sample via nearest neighbour analysis

View source: R/f.R

findNearestNeighbourClustersR Documentation

Cluster sample via nearest neighbour analysis

Description

Cluster sample via nearest neighbour analysis

Usage

findNearestNeighbourClusters(
  object,
  n_pcs = 30,
  k = 50,
  searchtype = "priority",
  treetype = "bd",
  radius = 0,
  eps = 0,
  verbose = TRUE,
  of_sample = NA
)

Arguments

object

An object of class spata2.

k

The maximum number of nearest neighbours to compute. The default value is set to the smaller of the number of columnns in data.

treetype

Character vector. Character vector specifying the standard 'kd' tree or a 'bd' (box-decomposition, AMNSW98) tree which may perform better for larger point sets.

verbose

Logical. If set to TRUE informative messages regarding the computational progress will be printed.

(Warning messages will always be printed.)

of_sample

This argument is currently inactive. It might be reactivated when spata-objects can store more than one sample.

searchtypes

Character value. Either 'priority', 'standard' or 'radius '. See details for more.

Details

Search types: priority visits cells in increasing order of distance from the query point, and hence, should converge more rapidly on the true nearest neighbour, but standard is usually faster for exact searches. radius only searches for neighbours within a specified radius of the point. If there are no neighbours then nn.idx will contain 0 and nn.dists will contain 1.340781e+154 for that point.

Value

A tidy spata-data.frame containing the cluster variables.


kueckelj/SPATA2 documentation built on March 16, 2024, 10:25 a.m.