title: Find range and number of positions with zero
body: <p>I have two excel file </p>
  
  <p><a href="https://i.stack.imgur.com/T6ulV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/T6ulV.png" alt="enter image description here"></a></p>
  
  <p>And,</p>
  
  <p><a href="https://i.stack.imgur.com/HzRmV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HzRmV.png" alt="enter image description here"></a></p>
  
  <p>I want to know the range and positions with 0 coverage values and an output as follows:</p>
  
  <p><a href="https://i.stack.imgur.com/Sy8q2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Sy8q2.png" alt="enter image description here"></a></p>
  
  <p>Where, </p>
  
  <pre><code>size = (end - start)+1
  
  mapped = positions with &gt; 0 Coverage
  
  %mapped = (mapped/size)*100
  
  Completeness = (Total mapped/Total Size)*100
  </code></pre>
  
  <p>for e.g for the above output Completeness = ((3+2)/(7+5))*100 = 41.66% </p>
  
  <p>I have several such input files to be analyzed. How can I do this in R?</p>