title: What is the purpose of this trailing comma in R?
body: <p>Why does the first line work and the 2nd not? I can't find the reason in the documentation on how to use which to select data although by chance I figured out I needed a comma.</p>
  
  <pre><code>sigData &lt;- data[which(abs(data$wc2) &gt; 3*wc2_sd),]
  
  
  sigData &lt;- data[which(abs(data$wc2) &gt; 3*wc2_sd)]
  </code></pre>