-
Notifications
You must be signed in to change notification settings - Fork 3
/
README.Rmd
66 lines (42 loc) · 1.8 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# envsetup <img src='man/figures/logo.png' align="right" height="200" style="float:right; height:200px;" />
<!-- badges: start -->
[<img src="http://pharmaverse.org/shields/envsetup.svg">](https://pharmaverse.org)
<!-- [![CRAN status](https://www.r-pkg.org/badges/version/envsetup)](https://CRAN.R-project.org/package=envsetup) -->
[![codecov](https://codecov.io/gh/pharmaverse/envsetup/branch/main/graph/badge.svg)](https://app.codecov.io/gh/pharmaverse/envsetup?branch=main)
<!-- badges: end -->
## Overview
The purpose of this package is to support the setup of the R environment. The two main features are:
- `autos` to automatically source files and/or directories into your environment
- `paths` to consistently set path objects across projects for I/O
Both are implemented using a configuration file to allow easy, custom configurations that can be used for multiple or all projects.
## Installation
```{r eval = FALSE}
install.packages("envsetup")
```
### Development version
```{r eval = FALSE}
# install.packages("devtools")
devtools::install_github("pharmaverse/envsetup")
```
## Usage
1. Create the _envsetup.yml configuration file to specify your autos and paths and store centrally. See `vignette("config")` for more details on how to create your config.
2. Create or update your `.Rprofile` to read in the config and call `rprofile()`
```{r eval = FALSE}
library(envsetup)
# read configuration
envsetup_config <- config::get(file = "path/to/_envsetup.yml")
# pass configuration to rprofile() to setup the environment
rprofile(envsetup_config)
```