Description Usage Arguments Details Value Examples
Generate a string for the standard pacman script header that, when added to scripts, will ensure pacman is installed before attempting to use it. pacman will attempt to copy this string (standard script header) to the clipboard for easy cut and paste.
1 | p_boot(load = TRUE, copy2clip = interactive())
|
load |
logical. If |
copy2clip |
logical. If |
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.
Returns a script header string (optionally copies to the clipboard).
1 | p_boot()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.