Description Usage Arguments Value Author(s)

View source: R/ComplexInternal_functions.R

This function carried out k-NN analyses on the provided data.

1 |

`X` |
a vector or matrix of the nearest neighbours. If |

`K` |
is the number of nearest neighbours that the method will use for assigning group classification. |

`Weighting` |
is a logical TRUE or FALSE determining whether classification will be based on a weighted K. In this method a simple weighting system is used where weights are 1/distance, where distances is the distance of the considered neighbour from the unknown. |

`TieBreaker` |
is the method used to break ties if there is no majority resulting from K. Three methods are available('Random', 'Remove' and 'Report'): Random randomly returns one of tied classifications; Remove returns 'UnIDed' for the classification; Report returns a the multiple classifications as a single character string with tied classifications separated by '_'. NOTE: for correct cross-validation proceedures the results of both Report will be considered an incorrect identification even if one of the multiple reported classifications is correct. |

Returns the classification of the unknown individual to be identified.

Ardern Hulme-Beaman

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.