Description Usage Arguments Value
View source: R/project-maintenance.R
Run this function after creating a new RStudio project if it is stored within a OneDrive folder. This function performs the following steps: (1) copy the selected folders (.Rproj.user and/or .git) onto the local file system outside of OneDrive, (2) write a function to an Rscript file within the project directory, (3) write the Windows cmd text to run that script to the clipboard. At that point, the user will need to close RStudio and paste the text into a Windows cmd prompt. This will run the newly-created script, which will (4) delete the selected files from within the RStudio project directory and replace them with symbolic links to the copies outside of OneDrive.
1 2 3 | onedrive_sanitize(what = c("rproj", "git", "rhistory"),
dest_root = fs::path("C:", "Users", Sys.info()[["user"]],
"rstudio-projects"))
|
what |
A character vector. Either "rproj", "git", or c("rproj", "git") (the default). |
dest_root |
The file path to which to move the specified files (should be outside OneDrive). |
Run for its side effects.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.