title: Saving R objects (code) in .R files (R genetic programming)
body: <p>I'm using R for genetic programming with the RGP package. The environment creates functions that solve problems. I want to save these functions in their own .R source files. I can't for the life of me figure out how. One way I've tried is this:</p>
  
  <pre><code>bf_str = print(bf)
  save(bf_str,file="MyBestFunction.R"))
  </code></pre>
  
  <p>bf is simply the best fit function. I've tried it also like this:</p>
  
  <pre><code>save(bf,file="MyBestFunction.R"))
  </code></pre>
  
  <p>The outputted file is super weird. Its just a bunch of crazy characters</p>