title: R: Create frequency table with positive test results
body: <p>I have an example dataframe with 4 columns. It has a column with birdspecies names and results from 3 different tests. If there is a number in the Test columns, then that means the test is positive. </p>
  
  <pre><code>&gt; df
      Birdspecies Test1   Test2  Test3
  1     Blackbird   ND     29     NA
  2     Blackbird   31.1   ND/ND  NA
  3     Blackbird   35.5   NA     NA
  4     Blackbird   36.6   31     NA
  5    Bluethroat   NA     NA     NA
  6    Bluethroat   NA     40     NA
  7    Bluethroat   34     34     CL
  8  Feral pigeon   34.9   35     NA
  9  Feral pigeon   34     NA     NA
  10  Tufted Duck   NA     39     NA
  </code></pre>
  
  <p>I want to modify this dataframe into something like this:</p>
  
  <pre><code> Birdspecies   Total Test1 Test2 Test3
  1    Blackbird     4    3    2     0
  2   Bluethroat     3    1    2     0
  3 Feral pigeon     2    2    1     0
  4  Tufted Duck     1    0    1     0
  </code></pre>
  
  <p>The first column with birdspecies is now collapsed and the "Total" column shows the total frequency of each birdspecies. The test columns show the frequencies of each positive test result.</p>
  
  <p>Any help is appreciated. </p>