Assign nearest node to each datapoint

1 | ```
MapDataToCodes(codes, newdata, distf = 2)
``` |

`codes` |
matrix with nodes of the SOM |

`newdata` |
datapoints to assign |

`distf` |
Distance function (1=manhattan, 2=euclidean, 3=chebyshev, 4=cosine) |

Array with nearest node id for each datapoint

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.