# NOT RUN {
p_load(lattice)
p_loaded()
p_unload(lattice)
p_loaded()
p_load("lattice", "MASS")
p_loaded()
p_unload(all)
p_loaded() # will not work as you unloaded pacman
library(pacman)
p_load(lattice, MASS, foreign)
p_loaded()
p_unload(pacman, negate=TRUE)
p_loaded()
# }
Run the code above in your browser using DataLab