title: Is there a way to log or record the output from R functions?
body: <p>Let's say I am running some code in R. As an example:</p>
  
  <pre><code>x &lt;- 1
  
  if (x == 0.1){
      print('X = 0.1')
      } else if (x &gt; 0.1){
      print('X is bigger than 0.1 ')
      } else {
      print('X is smaller than 0.1')
      }
  </code></pre>
  
  <p>If I look at the history file in R studio it will show me that I ran this conditional statement but it will not show me the outcome (i.e. X is bigger than 0.1). </p>
  
  <p>Is there a way to automatically log the output in R or R studio?</p>