The script header takes the form of:
if (!require("pacman")) install.packages("pacman"); library(pacman)
This can be copied to the top of scripts to make it easy to run scripts if
the user shares them with others or to aid in long term script management.
This may also be useful for blog posts and R help sites like
TalkStats or
StackOverflow. In this
way functions like p_load
can be used without fear that others don't
have pacman installed.