title: In R, how would I loop a vector of characters through a function that cannot accept double
body: <p>In R I try and make a loop/lapply function to run a list of characters through a function that processes and t.tests them. I am currently trying to run the function with a predefined variable, however I would like to have the function repeat down a list.</p>
  
  <pre><code>Data_F = ABC #this references a row in the Data1 Matrix. Data_Fs is the Columns.
  Variable="item"
  ttestFunc &lt;-function(x){
  #Make a matrix one tall to turn into a numeric vector
  Data1[Data_F, Data_Fs]-&gt; "ttesttest"
  as.numeric-&gt; "ttestvect"
  t.test(ttestvect, ttestvect)
  </code></pre>
  
  <p>Basically, I would like to know how to loop through multiple variables to input into Data_F instead of the predefined ABC. I want to loop through a vector like</p>
  
  <pre><code>c("ABC", "ABB", "XYZ")
  </code></pre>