title: 'x' must be numeric Traceback: for computing correlation for a matrix
body: <p>I want to compute the correlation between each column within a matrix.  But it throw an error: "Error in cor(sample, use = "pairwise.complete.obs"): 'x' must be numeric Traceback:</p>
  
  <ol>
  <li><code>cor(sample, use = "pairwise.complete.obs")</code></li>
  <li><code>stop("'x' must be numeric")"</code></li>
  </ol>
  
  <p>This is what I did:</p>
  
  <pre><code>data = read.csv("mail.csv", header=F)
  
  sample = data[-(1),-(1)]
  
  cor(sample, use="pairwise.complete.obs")
  </code></pre>
  
  <p>My data set looks like this: I would appreciate if someone could tell me where I did wrong? 
  <a href="https://i.stack.imgur.com/p0Hwj.png" rel="nofollow noreferrer">enter image description here</a></p>