title: R function that counts rows where conditions are met
body: <p>I am trying to create a new column that counts each column where criteria are met. That is because I want to summarize the number of correct answers by each participant in my master thesis. I am really new to R and in desperate need for help, even on easy tasks.</p>
  
  <p><strong>For Example:</strong></p>
  
  <p>(Participant,    Task1,     Task2,     Task3;   COUNT)</p>
  
  <p>1                  4         8         1    ;   <strong>1</strong>|</p>
  
  <p>2                  3         8         7    ;   <strong>1</strong>|</p>
  
  <p>3                  1         3         4    ;   <strong>2</strong>|</p>
  
  <p>4                  5         6         4    ;   <strong>1</strong>|</p>
  
  <p>5                  1         8         4    ;   <strong>3</strong></p>
  
  <p>The column COUNT should count all correct answers of the rows Task1-Task3. If the correct answers are (1, 8, 4), the COUNT row should result in the numbers shown in the example above.</p>
  
  <p>Can anybody tell me how to create such a variable?</p>
  
  <p>Really appreciated, thanks
  Luca</p>