-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
84 lines (51 loc) · 2.45 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
---
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%"
)
```
# labor
<!-- badges: start -->
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)
<!-- badges: end -->
The goal of `{labor}` is to keep your project folder structured, tidy and to sync it easily to local folders.
The package works only on MacOs systems.
# Installation
Download the package in a local folder and then run the following code.
```{r intallation, eval=FALSE, include=TRUE}
devtools::install_local("path_to_package")
```
Alternatively, you can install it directly from github.
```{r intallation2, eval=FALSE, include=TRUE}
library(devtools)
devtools::install_github("c1au6i0/labor")
```
# Usage
## Create a folder tree
To set up your lab folder, start running `create_labtree`.
![](inst/gifs_readme/create_labtree.gif)
The function generates the folder structure used for projects in our lab, and relative `README` files.
If you run the function multiple types, you will be prompt to decide if overwrite or not particular folders.
![](inst/gifs_readme/create_labfolder2.gif)
Use `remove_labtree` to remove the folders just created.
## Sync with local folder
Under the hood, the package `{labor}` use `rsync` to sync local folders. Set up the destination folder using `set_sync_lab`
![](inst/gifs_readme/set_destination.gif)
The destination folder is saved (`.labor_destination`) in a file in the project directory .
Then run `sync_lab` to sync the project folder with the destination.
![](inst/gifs_readme/sync.gif)
**Convenient things about `lab_sync` :**
1. No need to retype origin and destination every time in `rsync`.
2. Files containing authentication information and `renv` packages are not synced. You can use `exclude_files` to decide to not sync other specific files.
3. You can bidirectional sync the folders by setting the argument `direction`
4. You can still decide to use any `rsync` flags by setting the argument `rsync_flags` (default is `-avtuP`).
## Are you keeping things in the right place?
Run `check_lab` to see if you have messy directories.
![](inst/gifs_readme/check_folder.gif)
The report generated indicates the absolute and over the total number of files misplaced and it lists them.