title: What is the logic of this function in R?
body: <p>I'm studying about arguments in R functions, but I have some problem to understand the logic of it.</p>
  
  <pre><code>h &lt;- function(a = 1, b = d){
      d &lt;- (a + 1)^2
      c(a, b)
  }
  
  h()
  # [1] 1 4
  </code></pre>
  
  <p>I expected the error message would be return because there is no value of <code>b</code>.
  <code>d</code> is created under <code>h</code> function but there is no code like <code>b = d</code> which assign a value to <code>b</code> in function <code>h</code> .</p>
  
  <p>However, the result is <code>[1] 1 4</code>.</p>
  
  <p>How were <code>b</code> and <code>d</code> linked?</p>