title: R: Using equation with natural logarithm in nls
body: <p>Good day,</p>
  
  <p>I am struggling with R and natural logarithm (ln).  Firstly, I cannot find a ln(x) function in R.  I have noticed that log(x) is the same as ln(x) (when using ln(x) with a calculator).</p>
  
  <p>In R:</p>
  
  <pre><code>log(5) = 1.609438
  </code></pre>
  
  <p>And with a calculator:</p>
  
  <pre><code>ln(5) = 1.609438
  log(5) = 0.69897
  </code></pre>
  
  <p>I'm trying to fit an equation in R (this is exactly how I found in the literature of 3 references):</p>
  
  <p>y = a + b(<sup>x</sup>/<sub>305</sub>) + c(<sup>x</sup>/<sub>305</sub>)<sup>2</sup> + d <em>ln</em>(<sup>305</sup>/<sub>x</sub>) + f <em>ln</em><sup>2</sup>(<sup>305</sup>/<sub>x</sub>)</p>
  
  <p>Is it correct to use the following syntax in R to use the equation?</p>
  
  <pre><code>y ~ a + b*(x/305) + c*((x/305)^2) + d*log(305/x) + f*(log(305/x))^2
  </code></pre>
  
  <p>The idea is to use this function with nls() in R.
  Thanks in advance!</p>