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.
Download the package in a local folder and then run the following code.
devtools::install_local("path_to_package")
Alternatively, you can install it directly from github.
devtools::install_github("c1au6i0/labor")
To set up your lab folder, start running create_labtree
.
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.
Use remove_labtree
to remove the folders just created.
Under the hood, the package {labor}
use rsync
to sync local folders.
Set up the destination folder using set_sync_lab
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.
Convenient things about lab_sync
:
- No need to retype origin and destination every time in
rsync
. - Files containing authentication information and
renv
packages are not synced. You can useexclude_files
to decide to not sync other specific files. - You can bidirectional sync the folders by setting the argument
direction
- You can still decide to use any
rsync
flags by setting the argumentrsync_flags
(default is-avtuP
).
Run check_lab
to see if you have messy directories.
The report generated indicates the absolute and over the total number of files misplaced and it lists them.