Created
May 3, 2019 17:16
-
-
Save ollin18/847f7e294fc5fa6011eaa9060f1d8f92 to your computer and use it in GitHub Desktop.
Function to load a bunch of packages and install them if not already
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Pkg | |
function useit(list::Array{Symbol}) | |
installed = [key for key in keys(Pkg.installed())] | |
strpackages = @. string(list) | |
uninstalled = setdiff(strpackages,installed) | |
map(Pkg.add,uninstalled) | |
for package ∈ list | |
@eval using $package | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment