reverse.lookup: Perform a reverse lookup on searchables

Description Usage Arguments Value reverse.lookup Note See Also Examples

View source: R/reverse.lookup.R View source: R/reverse.lookup.R

Description

This function causes the pattern search to be performed against an object's values instead of its names

Usage

1

Arguments

string

pattern for which to match against an objects values

reverse.lookup sets and toggles the logical attribute with name reverse.lookup. Actual implementation of the reverse lookup is performed in the Extract methods.

In order to perform a reverse lookup, values must be converted to character names.

Value

a string object with the reversse.lookup attribute set.

reverse.lookup

When performing a reverse lookup, values (not names) are searched. The corresponding names are returned. NOTE: this is highly experimental and only works for atomic vectors. It is uncertain how this might be applied to recursive structures like lists.

Note

What happens if there are two reverse.lookups

See Also

The invert function in the hash package

Examples

1
reverse.lookup("string")


searchable documentation built on May 19, 2017, 10:25 a.m.
Search within the searchable package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.