title: exponential function in R
body: <p>I have basic knowledge in R, I would like to know how to write a code of an exponential function in R </p>
  
  <pre><code>F(X)=B(1-e^-AX)
  </code></pre>
  
  <p>where A=lambda parameter, B is a parameter represents the Y data, X represents the X data below.</p>
  
  <p>I need the exponential model to generate the curve to fit the data; for example:</p>
  
  <pre><code>X &lt;- c(22, 44, 69, 94, 119, 145, 172, 199, 227, 255) 
  </code></pre>
  
  <p>PS: this x-axis in numbers (in millions).</p>
  
  <pre><code>Y &lt;- c(1, 7, 8, 12, 12, 14, 14, 18, 19, 22)
  </code></pre>
  
  <p>This y-axis </p>
  
  <p>any idea of how to write the code and fit this model in the data...?</p>