title: R - list all global variables
body: <p>I'd like to list all the global variables in my script. Here is what I have so far</p>
  
  <pre><code>MyVariables&lt;-objects()
  for (i in MyVariables) {
    print(i)
  }
  </code></pre>
  
  <p>The above code works and prints out the names of all my global variables. However, I cant seem to find a way to also print out the values of the variables inside the loop. Any help is appreciated.</p>
  
  <p>Thanks</p>