findClosests: findClosests

Description Usage Arguments Details Examples

View source: R/gng.R

Description

Finds closest node from given list to vector. Often used together with calculateCentroids

Usage

1
findClosests(object, node.ids, x)

Arguments

object

GNG object

node.ids

List of indexes of nodes in gng.

x

Can be either vector or data.frame.

Details

Find closest node

Examples

1
2
3
4
5
6
7
## Not run: 
gng <- GNG(gng.preset.sphere(100))
# Find closest centroid to c(1,1,1)
found.centroids <- calculateCentroids(gng)
findClosests(gng, found.centroids, c(1,1,1))

## End(Not run)

gmum.r documentation built on May 29, 2017, 3:52 p.m.

Related to findClosests in gmum.r...