| Title: | R Conviguration Package |
|---|---|
| Description: | Setup and configure an optimal R development environment. |
| Authors: | Jimmy Briggs [aut, cre] (ORCID: <https://orcid.org/0000-0002-7489-8787>) |
| Maintainer: | Jimmy Briggs <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-06-03 09:36:07 UTC |
| Source: | https://github.com/jimbrig/configR |
pak
Installs the pak R package by r-lib from their official binary GitHub build.
inst_pak()inst_pak()
Note this installs the development version of r-lib/pak using the following
code:
repo <- sprintf(
"https://r-lib.github.io/p/pak/stable/%s/%s/%s",
.Platform$pkgType,
R.Version()$os,
R.Version()$arch
)
install.packages("pak", repos = repo)
Invisible NULL
## Not run: inst_pak() ## End(Not run)## Not run: inst_pak() ## End(Not run)
Helper function for retrieving and settings the user's custom R_CONFIG_DIR.
r_config_dir(...)r_config_dir(...)
... |
Path elements passed as character strings to append to |
This function appends path elements to your default R_CONFIG_DIR. To find
R_CONFIG_DIR it will first attempt to search for the R_CONFIG_DIR environment
variable, and if unset defaults to ~/.config/R on all operating systems
(i.e. %USERPROFILE%\.config\R on Windows).
normalized path to the R_CONFIG_DIR
library(configR) # retrieve path to .Rprofile (i.e. ~/.config/R/.Rprofile) r_config_dir(".Rprofile") # retrieve path to your "profile" configuration directory # (i.e. ~/.config/R/profile) r_config_dir("profile")library(configR) # retrieve path to .Rprofile (i.e. ~/.config/R/.Rprofile) r_config_dir(".Rprofile") # retrieve path to your "profile" configuration directory # (i.e. ~/.config/R/profile) r_config_dir("profile")
Helper function to return your system's installed R version in a variety of commonly used formats.
See the format parameter for available options.
rver(format = c("full", "text", "lib", "major", "minor", "nickname"))rver(format = c("full", "text", "lib", "major", "minor", "nickname"))
format |
Character string of one of the following: |
The following formatted return values can be specified with the format argument:
full: returns the full {major}.{minor}.{patch} semantic version of R.
text: returns the version string of R in the format "R version {major}.{minor}.{patch} ({date} {crt})".
lib: returns {major}.{minor} R version string; useful for your .libPaths().
major: returns only the major R version.
minor: returns only the minor R version.
nickname: returns the R version's nickname (i.e. the value listed on startup).
character string in specified format
library(configR) # get full R version rver() # get path the default library path r_config_dir("lib", rver("lib")) # get full text string of R version details rver("text")library(configR) # get full R version rver() # get path the default library path r_config_dir("lib", rver("lib")) # get full text string of R version details rver("text")