Dynamic variable names in function in R
<p>I am looking to make a function that takes a vector as input, does some simple arithmetic with the vector and call the new vector something which consists of a set string (say, "log.") plus the original vector name.</p>

<pre><code>d = c(1 2, 3)
my.function &lt;- function { x
x2 &lt;- log(x)
...
</code></pre>

<p>I would like the function to return a vector called log.d (that is, not log.x or something set, but something dependent on the name of the vector input as x).</p>