Remove ignored files
This commit is contained in:
26
elpa/ess-20180701.100/etc/ESSR/R/pkg.R
Normal file
26
elpa/ess-20180701.100/etc/ESSR/R/pkg.R
Normal file
@@ -0,0 +1,26 @@
|
||||
|
||||
.ess_keep <- function(.x, .f, ...) {
|
||||
is_true <- vapply(.x, .f, logical(1), ...)
|
||||
.x[is_true]
|
||||
}
|
||||
|
||||
.ess_devtools_functions <- function() {
|
||||
if (!requireNamespace("devtools")) {
|
||||
.ess_mpi_error("devtools is not installed")
|
||||
stop("internal error")
|
||||
}
|
||||
devtools_env <- asNamespace("devtools")
|
||||
exports <- getNamespaceExports("devtools")
|
||||
funs_exported <- as.list(devtools_env)[exports]
|
||||
|
||||
is_first_arg <- function(f, arg) {
|
||||
args <- names(formals(f))
|
||||
length(args) && args[[1]] == arg
|
||||
}
|
||||
|
||||
funs_pkg <- .ess_keep(funs_exported, is.function)
|
||||
funs_pkg <- .ess_keep(funs_pkg, is_first_arg, "pkg")
|
||||
funs_names <- sort(names(funs_pkg))
|
||||
|
||||
funs_names
|
||||
}
|
||||
Reference in New Issue
Block a user