what is nn.index mean in KNN output
I guess you are using the fnn package.

attr is a list of attributes which can be used for both nn.index and nn.dist. In this case, you are using index.

So, index returns an n x k matrix for the nearest neighbor indice.

And the definition of the nearest neighbor index is:


  The nearest neighbor index is expressed as the ratio of the observed
  distance divided by the expected distance.


Definition reference