| funSource | R Documentation | 
open source code of a function in a loaded or specified package on github.com/cran or github.com/wch/r-source
funSource(x, character.only = is.character(x), local = FALSE)
x | 
 Function name, with or without quotation marks.
Trailing brackets are removed:   | 
character.only | 
 If TRUE, look for   | 
local | 
 Open offline version of the code? Lacks comments and original formatting of source code. DEFAULT: FALSE  | 
links that are also opened with browseURL
Berry Boessenkool, berry-b@gmx.de, Jan+Dec 2016, May 2017, April 2019
https://github.com/brry/rskey#rskey to add this as a keyboard shortcut
## Not run:  ## browser windows should not be opened in CRAN checks
funSource("head")
funSource(message()) # handles brackets if fun can be evaluated without input
funSource("require", local=TRUE) # usefull when offline
funSource("OSMscale::earthDist") # works even for non-installed CRAN packages
is.error(funSource("earthDist"), TRUE, TRUE) # Error for unloaded package
require(plotrix); require(scales)
funSource(rescale) # from the last loaded package
tail <- function(...) stop("This is a dummy function. Type: rm(tail)")
funSource("tail")
rm(tail)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.