title: Use paste within for loop
body: <p>I'm trying to use <code>paste</code> in a <code>for loop</code> in <code>R</code> to create new <code>expressions</code> for a <code>ggplot</code>. I currently have:</p>
  <pre><code>x_axis_label &lt;- list()
  for (i in seq_len(4)) {
    x_axis_label[[i]] &lt;- expression(paste(&quot;10&quot;^as.character(i)))
  }
  </code></pre>
  <p>but this returns:</p>
  <pre><code>[[1]]
  expression(paste(&quot;10&quot;^as.character(i)))
  
  [[2]]
  expression(paste(&quot;10&quot;^as.character(i)))
  
  [[3]]
  expression(paste(&quot;10&quot;^as.character(i)))
  
  [[4]]
  expression(paste(&quot;10&quot;^as.character(i)))
  </code></pre>
  <p>Is it possible to use a <code>for loop</code> and paste a value within an <code>expression</code> in <code>R</code>?</p>
  <p>EDIT: I would like to have a vector similar to the below:</p>
  <pre><code>x_axis_label &lt;- c(expression(paste(&quot;10&quot;^&quot;2&quot;)),
                    expression(paste(&quot;10&quot;^&quot;3&quot;)),
                    expression(paste(&quot;10&quot;^&quot;4&quot;)))
  expression(paste(&quot;10&quot;^&quot;2&quot;), paste(&quot;10&quot;^&quot;3&quot;), paste(&quot;10&quot;^&quot;4&quot;))
  </code></pre>
  <p>Thanks.</p>