Error using %r with a tuple
<p>I'm trying to make a string by inserting a tuple. I'm trying to get <code>'k = as.numeric(list(1, 2, 3))'</code> as my output:</p>

<pre><code>j = (1, 2, 3)
'k = as.numeric(list%r)' % j
</code></pre>

<p>This returns </p>

<pre><code>Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
TypeError: not all arguments converted during string formatting
</code></pre>

<p>Could someone please explain what went wrong here? Thanks.</p>
