title: Dynamic Reply based on String in a Row
body: <p>I have a dataframe with 3 columns and 500 rows and I want to use a function data$GDP based on if a dataframe row in COMBO contains "pmi23". I do it in a loop so in the first loop, if row 1 contains "pmi23" at either column 1,2,3, a function TEST should be carried on (that is, data$GDP times the logical test that returns 1). What R function can return 1 for me in such a case?</p>
  
  <p>MY DATA was created through:</p>
  
  <pre><code>library(plyr)
  
  Comb1 &lt;- CombSet(c("pmi23","yc23","debt23","st23","pmiyc","pmidebt","pmist","ycdebt","ycst","debtst"), c(1), repl = FALSE, ord = FALSE, as.list = FALSE)
  Comb2 &lt;- CombSet(c("pmi23","yc23","debt23","st23","pmiyc","pmidebt","pmist","ycdebt","ycst","debtst"), c(2), repl = FALSE, ord = FALSE, as.list = FALSE)
  Comb3 &lt;- CombSet(c("pmi23","yc23","debt23","st23","pmiyc","pmidebt","pmist","ycdebt","ycst","debtst"), c(3), repl = FALSE, ord = FALSE, as.list = FALSE)
  
  Comb1 &lt;- as.data.frame(Comb1)
  Comb2 &lt;- as.data.frame(Comb2) 
  Comb3 &lt;- as.data.frame(Comb3)
  
  COMBO &lt;- rbind.fill(Comb1,Comb2,Comb3)
  </code></pre>
  
  <p>For some reason, <code>"pmi23" %in% DATA[1,]</code> does not work while <code>"pmi23" %in% DATA[1,1]</code> does so I need either an OR test for all rows or an alternative.</p>