title: create a new data frame after mutating
body: <p>I am trying to create a new data frame after mutating values of second column of df1 and 2:4 rows.
  so I want to subtract all values of df1[c(2:4),NCOL(df1)] with tax_v and create a new data frame dynamically.</p>
  <pre><code>df1 &lt;- data.frame(t = c(&quot;77%&quot;,&quot;72%&quot;,&quot;74%&quot;,&quot;77%&quot;,&quot;79%&quot;),
                    s = c(&quot;73%&quot;,&quot;74%&quot;,&quot;79%&quot;,&quot;74%&quot;,&quot;79%&quot;))
  tax_v = &quot;74%&quot;
  
  new_col &lt;- as.numeric(gsub(&quot;%&quot;,&quot;&quot;,c(df1[c(2:4),NCOL(df1)]))) %&gt;% as.data.frame() %&gt;% mutate(across(v1 = new_col[,1]-tax_v))
  </code></pre>
  <p>output should be like  a data frame</p>
  <p><a href="https://i.stack.imgur.com/RFEX4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RFEX4.png" alt="enter image description here" /></a></p>