I have tired loading libraries , so i decided to use something like this:
library(purrr)
map(list(dplyr,ggplot2,rcompanion),library)
and failed. So the only way why - packages are not the object, aren't they ?
I have tired loading libraries , so i decided to use something like this:
library(purrr)
map(list(dplyr,ggplot2,rcompanion),library)
and failed. So the only way why - packages are not the object, aren't they ?
As described here (Load multiple packages at once), you can specify a list of packages to load and use the following code to load them:
listpackage = c("dplyr","ggplot2","survival", "data.table", "edgeR", "DESeq2")
lapply(listpackage, require, character.only = TRUE)
Thanks for help! With your comments i have built purrr way:
load_packages <- partial(require,character.only=TRUE)
packages <- list('ggplot2','rcompanion')
map(packages,load_packages)