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?
What about:
which(df == "horse", arr.ind = TRUE) # row col # [1,] 2 1 # [2,] 3 1 # [3,] 5 2 # [4,] 4 3