Description Usage Arguments Value See Also

The maxmium distance in the input dimensions is required to generate a value of the neighborhood radius. For datasets with >1000 observations an all pairs calculation is prohibitive. Instead probability sampling is used so that two points are randomly chosen and their distance is calculated. This is repeated for a user specified number of times and the maximum distance obtained is kept track of and returned at the end.

1 2 3 | ```
sample.max.distance( coord,
nobs = 0, ndim = 0,
samplesize = 1e6)
``` |

`coord` |
The input data in matrix form. If present in a data.frame it will be coerced to a matrix |

`nobs` |
The number of observations (rows of the input matrix should be the same as the rows of the embedding matrix) If it is not specified nobs will be taken as nrow(coord) |

`ndim` |
The number of input dimensions. If not specified it will be taken as ncol(coord) |

`samplesize` |
The number of iterations for probability sampling. For a dataset of 6070 observations there will be 6070x6069/2 pairwise distances. The default value gives a close approximation and runs fast. If you want a better approximation 1e7 is a good value. YMMV |

Returns the value of the maxmium distance found as a single number

spe

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.