title: Replacing Column Value with Randomised Values
body: <p>Hi guys I am trying to replace a certain value in <strong>a dataframe</strong> with randomised numerical values within a certain range.</p>
  
  <p>Sample dataframe is provided below and I want to replace all numerical 3 with values between 0 and 0.1.</p>
  
  <pre><code>df &lt;- data.frame(datay = sample(1:5, 10, replace = TRUE), 
                   dataz = sample(1:10, 10, replace = TRUE))
  </code></pre>
  
  <p><strong>Input:</strong></p>
  
  <pre><code>   datay dataz
  1      5     8
  2      5     3
  3      2     1
  4      5    10
  5      4     5
  6      1     6
  7      1     8
  8      3     2
  9      3     9
  10     3     4
  </code></pre>
  
  <p><strong>Output:</strong></p>
  
  <pre><code>    datay dataz
  1      5     8
  2      5     0.05
  3      2     1
  4      5    10
  5      4     5
  6      1     6
  7      1     8
  8      0.05     2
  9      0.02     9
  10     0.01     4
  </code></pre>