% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/2_buildSOM.R
\name{MapDataToCodes}
\alias{MapDataToCodes}
\title{Assign nearest node to each datapoint}
\usage{
MapDataToCodes(codes, newdata, distf = 2)
}
\arguments{
\item{codes}{matrix with nodes of the SOM}

\item{newdata}{datapoints to assign}

\item{distf}{Distance function (1 = manhattan, 2 = euclidean, 3 = chebyshev, 
4 = cosine)}
}
\value{
Array with nearest node id for each datapoint
}
\description{
Assign nearest node to each datapoint
}
