title: R-Stats package: Spearman correlation "argument "y" is missing, with no default"
body: <p>I am trying to test the correlation for a given dataset:</p>
  
  <pre><code>&gt; file &lt;- read.csv("dataset.csv", header = TRUE, sep = ";", dec = ".")
  
  &gt; cor.test(file[, -file$ID], method = "spearman") 
  </code></pre>
  
  <p>ID is identifying each point, so I dont want to consider that in the analysis. Even when considering the whole file, the error is the same</p>
  
  <p>I get this error:</p>
  
  <blockquote>
    <p>Error in cor.test.default(file[, -file$ID], method = "spearman") : 
      argument "y" is missing, with no default</p>
  </blockquote>
  
  <p>Why is this happening? Do you know how can I solve this?
  I know I am supposed to have both vectors (x and y), but I wanted to consider the whole dataset at the same time.</p>