title: input variable stored in list into loop in R
body: <p>I'm sure there are much better ways of doing this, I'm open to suggestions.</p>
  
  <p>I have these vectors:</p>
  
  <pre><code>vkt1 &lt;- c("df1", "df2", "df3")
  vector2 &lt;- paste("sample", wSheatx, sep="_")
  </code></pre>
  
  <p>The first vector contains a list of the names of dataframes stored in the environment. These are stored as strings, but I'd like to call them as variable names.
  The second vector is just the first one adding "sample" at the beggining, equivalent to:</p>
  
  <pre><code>vector2 &lt;- c('sample_df1', 'sample_df2', 'sample_df3')
  </code></pre>
  
  <p>These strings from <code>vector2</code> would serve as the names of new data frames to be created.</p>
  
  <p>Alrighty, so now I want to do something like this:</p>
  
  <pre><code>for (i in 1:length(vector){    # meaning for i in 1,2,3
      vector2[i] = data.frame(which(eval(parse(text = vkt1[i])) == "Some_String", arr.ind=TRUE))
      addStyle(wb, vkt1[i], cols = 1:ncol(eval(parse(text = vkt1[i]))), rows = vector2[[i]][,1]+1, style = duppedStyle, gridExpand = TRUE)
  }
  </code></pre>
  
  <p>It may look complicated, but the idea is to make a data frames named as the strings contained in <code>vector2</code>, being a subset of the data frames from <code>vkt1</code> when "Some_String" is found.
  Then, use that created data frame and add a style to the entire row when said string is present.</p>
  
  <p><code>vector2[[i]][,1]+1</code> is intended to deploy as <code>sample_df1[,1]+1</code> (in the first iteration)</p>
  
  <p>Note that I'm using <code>eval(parse(text = vkt1[i]))</code> to get the variables from the strings of <code>vkt1</code>. So, say, <code>eval(parse(text = vkt1[1]))</code> is equal do <code>df1</code> (the data frame, not the string)</p>
  
  <p>Like this, the code gives the following error:</p>
  
  <pre><code>In file(filename, "r") :
   cannot open file 'noCoinColor_Concat': No such file or directory
  </code></pre>
  
  <p>Been trying to get it working like so, but I'm beginning to feel this approach might be very wrong.</p>