title: How to call variables from a list of variable names in R
body: <p>I have of list of variable names.</p>
  
  <pre><code>list = c("smoke", "ptd", "ht", "ui", "racecat", "visit")
  </code></pre>
  
  <p>I want to make a series of plots like this.</p>
  
  <pre><code>plot(low[somevariable=="0"] ~ age[somevariable=="0"])
  </code></pre>
  
  <p>I'd like to replace somevariable with each of the variable name in the list. For example, </p>
  
  <pre><code>plot(low[smoke=="0"] ~ age[smoke=="0"])
  plot(low[ptd=="0"] ~ age[ptd=="0"])
  ......
  plot(low[visit=="0"] ~ age[visit=="0"])
  </code></pre>
  
  <p>I've tried to create a for-loop and use a variety of things to replace somevariable, such as</p>
  
  <pre><code>list[i], paste(list[i]), substitute(list[i]), parse(list[i])
  </code></pre>
  
  <p>But none of them works. I would really appreciate some help. Thanks in advance. </p>