Description Usage Arguments Details Value Examples
View source: R/exported_functions.R
This function tells R to load packages and library folders at the start of every session (or on a per-project basis). It's best to keep this auto-load list to a minimum so that you don't forget to explicitly install/attach packages in scripts that need them.
1 | lib_startup(..., lib = lib_paths(), global = TRUE)
|
... |
(Names) Packages as bare names. For packages that come from GitHub, you can
keep the username/package format, or omit the username and provide just the package
name. If you leave |
lib |
(Character) The path where packages are installed. Can be an
absolute or relative path. If |
global |
(Logical) If |
R's startup order is mentioned in ?Startup
, but briefly:
R tries to load the environmental variables file (Renviron.site)
R tries to load the site-wide profile (Rprofile.site)
R tries to load the user profile (.Rprofile), first in the current directory, and then in the user's home directory (on Windows, the My Documents folder). Only one of these files is sourced into the workspace.
Omitting ...
makes R load only its default packages. If these are not set in an
environmental variable (R_DEFAULT_PACKAGES
), then R will default to loading these
packages: datasets, utils, grDevices, graphics, stats, and methods.
A message listing the values that were written to the .Rprofile file.
1 | #> lib_startup(librarian, magrittr, lib = "C:/Dropbox/My R Library")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.