title: As.array to change data
body: <p>Very simple concept:</p>
  
  <pre><code>data(iris)
  d1=as.matrix(iris)
  d2=as.array(iris)
  Error in &lt;code&gt;dimnames&lt;-.data.framecode&gt;(&lt;code&gt;*tmp*code&gt;, value = list(n)) :invalid 'dimnames' given for data frame
  </code></pre>
  
  <p>i have made many kinds of dimnames ,failed .
  how to make as.array(iris) to be successful?</p>