Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # library多個套件,並且沒安裝的自動安裝
- library(pipeR)
- library_mul <- function(..., lib.loc = NULL, quietly = FALSE, warn.conflicts = TRUE){
- pkgs <- as.list(substitute(list(...))) %>>% sapply(as.character) %>>% setdiff("list")
- if (any(!pkgs %in% installed.packages()))
- install.packeges(pkgs[!pkgs %in% installed.packages()])
- sapply(pkgs, library, character.only = TRUE, lib.loc = lib.loc, quietly = quietly) %>>% invisible
- }
- library_mul(httr, pipeR, data.table)
Advertisement
Add Comment
Please, Sign In to add comment