#' atomizer
#'
#' @export
#' @param path_ref path to reference package, end of path is pkg name
#' @param path_new path to new package, end of path is pkg name
#' @param funcs function(s) to extract
#' @examples \dontrun{
#' atomizer(path_ref = "../rredlist", path_new = "../foobar", funcs = "rl_citation")
#' devtools::install("../foobar")
#' library("foobar")
#' foobar::rl_citation()
#' }
atomizer <- function(path_ref, path_new, funcs) {
res <- scattalyze(path_ref)
fout <- find_deps(res, fxns = funcs)
g <- extract_funcs(path_ref, fout)
xx <- get_imports(path_ref, fout)
write_pkg(path = path_new, fxns = g, imports = xx)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.