Can I search a character list for a string where I don\'t know how the string is cased? Or more generally, I\'m trying to reference a column in a dataframe, but I don\'t kn
The searchable
package was created for allowing for various types of searching within objects:
l <- list( a=1, b=2, c=3 )
sl <- searchable(l) # make the list "searchable"
sl <- ignore.case(sl) # turn on case insensitivity
> sl['B']
$b
[1] 2
It works with lists and vectors and does a lot more than simple case-insensitive matching.