Klimi's new dotfiles with stow.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

26 lines
666 B

.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
}