title: enzyme kinetics in R
body: <p>I am trying to perform <strong>enzyme kinetics in R</strong> instead of graph Pad I had used in the past but I did not come across any suitable R script that I could use to calculate <strong>Vmax and Km</strong> parameters using Michaelis Menton equation. Below I am posting my data and code that I have tried to use but this code is giving me errors and is not exactly what I am looking for.
  Also, I am wanting to fill the nls model <strong>per replicate per treatment</strong> (instead of treatment average) because I need the per replicate info for Vmax and Km that I would use later to calculate other parameters.
  So, in nutshell, I would like to find out the Vmax and Km value for each replicate for these two treatments (A &amp; B) on activity of enzyme (v) in a data frame form that I would be able to use for later calculation/analysis. Any help would be excellent given I am relatively new to R.</p>
  <p>Is there any tidyverse/dplyr function to get this done?</p>
  <pre><code>df&lt;- data.frame(Treatment = c(&quot;A&quot;, &quot;A&quot;, &quot;A&quot;, &quot;A&quot;, &quot;A&quot;, &quot;A&quot;, &quot;A&quot;, &quot;A&quot;, &quot;A&quot;, &quot;A&quot;, &quot;A&quot;, &quot;A&quot;,&quot;A&quot;, &quot;A&quot;, &quot;A&quot;, &quot;A&quot;, &quot;A&quot;, &quot;A&quot;, &quot;A&quot;, &quot;A&quot;, &quot;A&quot;, &quot;A&quot;, &quot;A&quot;, &quot;A&quot;, &quot;A&quot;,&quot;B&quot;, &quot;B&quot;, &quot;B&quot;, &quot;B&quot;, &quot;B&quot;,&quot;B&quot;, &quot;B&quot;, &quot;B&quot;, &quot;B&quot;, &quot;B&quot;, &quot;B&quot;, &quot;B&quot;, &quot;B&quot;, &quot;B&quot;, &quot;B&quot;, &quot;B&quot;, &quot;B&quot;, &quot;B&quot;, &quot;B&quot;, &quot;B&quot;, &quot;B&quot;, &quot;B&quot;, &quot;B&quot;,&quot;B&quot;, &quot;B&quot;),
              Concentration = c(0,0,0,0,0,10,10,10,10,10,50,50,50,50,50,100,100,100,100,100,200,200,200,200,200,0,0,0,0,0,10,10,10,10,10,50,50,50,50,50,100,100,100,100,100,200,200,200,200,200), 
              v = c(0,0,0,0,0,13,14,15,12,14,59,53,57,54,56,110,115,108,101,110,221,228,229,221,221,0,0,0,0,0,20,21,21,24,26,90,96,98,93,91, 179,175,176,179,170, 290,298,291,290,298))
  
  
  p&lt;- ggplot(data, aes(x=Concentration, y = Activity, color=Treatment)) +
  geom_point() +
  theme_bw() +
  xlab(&quot;Substrate (mM)&quot;) +
  ylab(&quot;Velocity (nmol/s)&quot;)+
  geom_smooth(method = &quot;nls&quot;, 
            formula = y ~ Vmax * x / (Km + x), 
            start = list(Vmax = 60, Km = 5),
            se = F, size = 1, 
            data = subset(data, Treatment==&quot;A&quot;)) +
  geom_smooth(method = &quot;nls&quot;, 
            formula = y ~ Vmax * x / (Km + x), 
            start = list(Vmax = 60, Km = 5),
            se = F, size = 1, 
            data = subset(data, Treatment==&quot;B&quot;))
  
   
  </code></pre>