title: Divide by a certain position in R
body: <p>I have several series, each one indicates the deflator for the GDP for each country. (Data attached down below)</p>
  <p>So what I want to do is to divide every column for the 97th position.</p>
  <p>I know this could be pretty simple for you, but I am struggling.</p>
  <p>This is my code so far:</p>
  <pre><code>d_data &lt;- d_data  %&gt;% 
    mutate_if(is.numeric, function(x) x/d_data[[97,x]])
  </code></pre>
  <p>So as you can see in the data, from columns 3 to 8 data are numeric.</p>
  <p>I think the error is that argument x of the function refers to the column name, while in the <code>d_data</code>, the second argument refers to column position and that is the main issue.</p>
  <p>How can I solve this? Thanks in advance!!</p>
  <h1>Data</h1>
  <hr />
  <p>Data was massive to put here (745 rows, 8 columns)</p>
  <p>So I uploaded the <code>dput(d_data)</code> output <a href="https://drive.google.com/file/d/1xaHp06XQqE8i_Rq_FcEmChSQiP_N9tFf/view?usp=sharing" rel="nofollow noreferrer">here</a></p>