title: Find string in data.frame
body: <p>How do I search for a string in a data.frame? As a minimal example, how do I find the locations (columns and rows) of 'horse' in this data.frame?</p>
  
  <pre class="lang-r prettyprint-override"><code>&gt; df = data.frame(animal=c('goat','horse','horse','two', 'five'), level=c('five','one','three',30,'horse'), length=c(10, 20, 30, 'horse', 'eight'))
  &gt; df
    animal level length
  1   goat  five     10
  2  horse   one     20
  3  horse three     30
  4    two    30  horse
  5   five horse  eight
  </code></pre>
  
  <p>... so row 4 and 5 have the wrong order. Any output that would allow me to identify that 'horse' has shifted to the <code>level</code> column in row 5 and to the <code>length</code> column in row 4 is good. Maybe:</p>
  
  <pre class="lang-r prettyprint-override"><code>&gt; magic_function(df, 'horse')
  col       row
  'animal', 2
  'animal', 3
  'length', 4
  'level',  5
  </code></pre>
  
  <p>Here's what I want to use this for: I have a very large data frame (around 60 columns, 20.000 rows) in which some columns are messed up for some rows. It's too large to eyeball in order to identify the different ways that order can be wrong, so searching would be nice. I will use this info to move data to the correct columns for these rows.</p>