Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/klmr/rprofile
https://github.com/klmr/rprofile
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/klmr/rprofile
- Owner: klmr
- License: mit
- Created: 2023-10-21T11:17:57.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-12T12:18:06.000Z (5 months ago)
- Last Synced: 2024-07-11T21:48:49.744Z (4 months ago)
- Language: R
- Size: 78.1 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- jimsghstars - klmr/rprofile - (R)
README
# rprofile
rprofile stream-lines project `.Rprofile` configuration loading.
## Installation
rprofile is on CRAN. Install it via
```r
install.packages('rprofile')
```## Usage
To use the package, add the following as the first line in a project `.Rprofile` file:
```r
try(rprofile::load())
```In most cases, that’s it. See the documentation for available parameters to customize the configuration, or have a look at this project’s own `.Rprofile` file.
At the moment, rprofile performs the following actions, in order, unless disabled via arguments:
1. If the project is using an renv environment, it will be activated.
2. If the project contains a `.env` file in its current path, it will be loaded via `readRenviron()`.
3. The user profile (that is, the file `~/.Rprofile`, or a file set via the `R_PROFILE_USER` environment variable) is loaded. Any errors that occur while loading this file will be converted into warnings, and `rprofile::load()` will invisibly return whether the file loaded without errors.
4. If the project is an R package, load it via `pkgload::load_all(export_all = FALSE)`. To avoid disrupting the regular package load order, this action will be deferred until after all default packages (given by `getOption('defaultPackages')`) have been loaded and attached.