title: R - Count numbers of certain values in each column
body: <p>I have found similar questions to mine, but none of them explains how to do that for each column of a dataframe.</p>
  
  <p>I have a dataframe like this:</p>
  
  <pre><code>x1 = seq(12, 200, length=20)
  x2 = seq(50, 120, length=20)
  x3 = seq(40, 250, length=20)
  x4 = seq(100,130, length=20)
  x5 = seq(10, 300, length=20) 
  
  df = data.frame(V1=x1, V2=x2, V3=x3, V4=x4, V5=x5) 
  </code></pre>
  
  <p>Now I want to get the number of values that are greater than 120 for each column. </p>
  
  <p>I have tried: </p>
  
  <pre><code>nrow(df[,1] &gt;120)
  </code></pre>
  
  <p>That didnt work, it says 0, but its not true, and also I want to do all columns automatically.</p>