title: Replace some numeric value after a pattern in a string of txt in R (grep?)
body: <p>I have several txt files that are input file for a model, I need to change some of the model parameters in order to conduct some experiments. However, there are many parameters and changing them by hand is somewhat time consuming. I thought about using readLines() and {grep} in R to search and replace the parameter values but not very successful, hope someone could help me. Thank you.</p>
  
  <p>The file has lines like this:</p>
  
  <pre><code>Bubbling Pressure 1          = 0.3389 .4423 .4118
  Field Capacity 1             = 0.35  0.38  0.37
  Wilting Point 1              = 0.13  0.14  0.13
  Bulk Density 1               = 750. 1400. 1500.
  Vertical Conductivity 1      = 2.904e-06  3.63e-05  3.63e-05
  
  .....
  
  Bubbling Pressure 3          = 0.2044 0.2876 0.2876
  Field Capacity 3             = 0.31  0.33  0.33
  Wilting Point 3              = 0.13  0.14  0.14
  Bulk Density 3               = 750. 1400. 1500.
  Vertical Conductivity 3      = 3.16e-06  3.95e-05  3.95e-05
  
  ...
  </code></pre>
  
  <p>I want to double all vertical conductivity parameters...But I am not sure how to isolate those numbers in scientific notation (such as "3.16e-06").</p>
  
  <p>Is there a way to isolate each one of the number in lines that contain the pattern "vertical conductivity"</p>
  
  <pre><code>Vertical Conductivity 3      = 3.16e-06  3.95e-05  3.95e-05
  </code></pre>
  
  <p>And then double each one of the numbers?</p>
  
  <pre><code>Vertical Conductivity 3      = 6.32e-06  7.90e-05  7.90e-05
  </code></pre>
  
  <p>I have manage to use grep to isolate each line of text that contains the pattern "Vertical Conductivity" but I am not sure how to get the numerical values out...</p>
  
  <p>Thanks,
  Nick</p>