funSource: Source code of a function

Description Usage Arguments Value Author(s) Examples

View source: R/funSource.R

Description

open source code of a function in a loaded or specified package on github.com/cran or github.com/wch/r-source

Usage

1
funSource(x, character.only = is.character(x), trydirect = TRUE)

Arguments

x

function name, with or without quotation marks

character.only

If TRUE, look for SomeFun instead of MyFun if MyFun <- "SomeFun". DEFAULT: is.character(x)

trydirect

If TRUE, try direct url to file x.R. DEFAULT: TRUE

Value

links that are also opened with browseURL

Author(s)

Berry Boessenkool, berry-b@gmx.de, Jan+Dec 2016

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Not run:  ## browser windows should not be openend in CRAN checks
library("berryFunctions")
funSource(colPoints) 
funSource("head") 
funSource("require", trydirect=FALSE) 

funSource(earthDist) 
funSource(OSMscale::earthDist) 
funSource("OSMscale::earthDist") 

## End(Not run)

## Not run:  # developmental testing
require(plotrix); require(scales)
funSource(rescale

tail <- function(...) stop("This is a dummy function. Type: rm(tail)")
funSource("tail")
rm(tail)

## End(Not run)

berryFunctions documentation built on May 30, 2017, 6:27 a.m.