 <p>I use the following:</p> <pre><code>loadRData &lt;- function(fileName){ #loads an RData file, and returns it load(fileName) get(ls()[ls() != "fileName"]) } d &lt;- loadRData("~/blah/ricardo.RData") </code></pre>