title: how to solve error : Error in storage.mode(x) <- "double" : 'list' object cannot be coerced to type 'double'
body: <p>Hello Im trying to run som and kmeans analysis.
  But I can't solve it because there's an error code.
  Error in storage.mode(x) &lt;- &quot;double&quot; :    'list' object cannot be coerced to type 'double'</p>
  <p>How can I solve this problem?</p>
  <pre><code>cdata &lt;- read.delim(&quot;Cluster.txt&quot;, stringsAsFactors=FALSE)
  cdata.n &lt;- scale(subset(cdata, select=-c(ID)))
  som_model2 &lt;- supersom(data = cdata.n, grid = somgrid(10, 10, &quot;rectangular&quot;))
  k = 6
  somClusters &lt;- kmeans(som_model2$codes, centers = 6)
  </code></pre>
  <p>I want to culstering into 6 clusters.
  Please help me</p>
  <p>I use this data.
  <a href="https://github.com/woosa7/R_DataAnalytics/blob/08ea98289f4def3c4f72d4c10d3767784b42619b/R_DataMining/data/Cluster.txt" rel="nofollow noreferrer">https://github.com/woosa7/R_DataAnalytics/blob/08ea98289f4def3c4f72d4c10d3767784b42619b/R_DataMining/data/Cluster.txt</a></p>