[R] Kohonen Package

Brock Tibert btibert3 at yahoo.com
Sat Nov 28 21:20:02 CET 2009


Hi All,

I am still learning R, but making, IMO, great strides.  I learned about Kohonen/Self-Organizing Maps in class and I would like to try to replicate some of the things we have seen in class.

Below is my code.  I am trying to create a u-matrix.  In the documentation on page 9 it appears the type of plot, dist.neighbours should do the trick, however, I am getting an error:
(Error in match.arg(type) : 'arg' should be one of "codes", "changes", "counts", "mapping", "property", "quality")

Since I am new to R, I figure I am missing something obvious.  Any help you can provide will be greatly appreciated!

Thanks in advance,

Brock

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
library(kohonen)

data("wines")
wines.sc <- scale(wines)

som <- som(wines.sc, grid=somgrid(5, 5, "hexagonal"))
plot(som)
plot(som, type="dist.neighbours" )




More information about the R-help mailing list