Title: | Lookup R function definitions, including compiled code, S3 and S4 methods |
---|---|
Description: | Provides a simple interface to lookup and print R function definitions, including C and C++ compiled code from .Call, .C, .Internal and .External calls. Also lookup of S3 and S4 generics, including a simple dialog to print any or all of the loaded methods for the generic. |
Authors: | Jim Hester [aut, cre], Hadley Wickham [aut] (s3 generic, methods functions from pryr), Gábor Csárdi [aut] (Code to handle busy notifications, paging of results) |
Maintainer: | Jim Hester <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.0.0.9000 |
Built: | 2024-11-04 04:52:36 UTC |
Source: | https://github.com/jimhester/lookup |
Lookup a function definiton
lookup(x, name = substitute(x), envir = environment(x) %||% baseenv(), all = FALSE, ...)
lookup(x, name = substitute(x), envir = environment(x) %||% baseenv(), all = FALSE, ...)
x |
name or definition of a function |
name |
function name if not given in x |
envir |
the environment the function was defined in |
all |
Whether to return just loaded definitions or all definitions |
... |
Additional arguments passed to internal functions |
If a github or CRAN lookup, this will open a browser to the github code mirror. If a local file will open the application associated with that file type.
lookup_browse(x = the$last_lookup)
lookup_browse(x = the$last_lookup)
x |
The lookup to browse, by default will use the last url of the last lookup found. |
This function uses GitHub's code search to search for a code usage in all packages on CRAN. It will open a browser window with the results so they can be explored.
lookup_usage(x)
lookup_usage(x)
x |
The term to search |
## Not run: lookup_usage("grep") ## End(Not run)
## Not run: lookup_usage("grep") ## End(Not run)
Retrieve the source url(s) from a lookup object
source_url(x, ...)
source_url(x, ...)
x |
The object to return the source_url from |
... |
Additional arguments passed to methods |