whereis | R Documentation |
Which environment/package(s) is/are a function located in the search() path
whereis(x, env = parent.frame(), mode = c("function", "any"))
x |
function or function name to search. |
env |
environment to search, if the function x is not found in this
environment, the parent environment is further searched until the top
environment, i.e. empty environment ( |
mode |
either "function" or "any", if mode = "function" (default), considering x is only a function object. |
environment where the function/object x is found.
If x is not found, NULL
is returned. If multiple
environments are found, the first environment is the default place to
get the value of x.
## Not run:
detachPackages("Matrix")
whereis("print")
whereis(print)
# Matrix::print is the default print
library(Matrix)
whereis("print")
identical(print, Matrix::print)
identical(print, base::print)
print = function() print()
whereis("print")
# Search any object
whereis(.Options, mode = "any")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.