title: How to calculate percentage from each row of two different columns in R
body: <p>please let me know how to calculate percentage from row wise in R.As i'm using prop.table function but it is not giving me solution </p>
  
  <pre><code>empid        presentdays        empid      absentdays
    1              5                1             10
    2              2                2              4
    3              6                3             12
  </code></pre>
  
  <p>I want to calculate percentage with respect to each empid as their performance</p>
  
  <pre><code>empid         presentdays       empid      absentdays    perfom%
    1                 5             1          10            50
    2                 2             2           4            50
  </code></pre>
  
  <p>how to do it in R as i've tried prop.table() function also but it doesn't work </p>