class: center, middle, inverse, title-slide # Rproject templates for YOUR workflow ### Caroline Ledbetter ### 2020-01-30 --- class: middle, left #**Why Rproject Templates?** -- #If you can automate you should automate -- #Stardized file structures are easy for you and your collaborators to work with --- .pull-left[ #**You need:** #an R project #Template Metadata #Template Function ] -- .pull-right[ <img src="img/filestructure.png" width="75%" /> ] --- class:center, middle <img src="img/CIDAtoolshex.png" width="60%" /> --- class:center, middle <img src="img/cidaproject.png" width="100%" /> --- <img src="img/projectsetup.dcf.png" width="100%" /> --- ```r proj_setup <- function(path, ...){ # ensure path exists dir.create(path, recursive = TRUE, showWarnings = FALSE) dots <- list(...) attach(dots) on.exit(detach(dots)) ProjectName <- paste0(path) ### Setup ReadMe Files ---- readme <- c(paste0("# ", ProjectName, " "), paste0("**PI:**", PI, " "), paste0("**Analyst**:", analyst, " "), "", "Details about the folders:", '', "File | Description", "---|----------------------------------------------------------", paste("Admin | contains the scope of work and other", "administrative documents"), paste("Background | contains the background information for", "the analysis"), "Code | contains all R scripts for this project" ) ``` --- # Resources Rstudio How To Guide: https://rstudio.github.io/rstudio-extensions/rstudio_project_templates.html CIDAtools Github Repo: [ledbettc/CIDATools](https://github.com/ledbettc/CIDAtools) #Find me at: .pull-right[ carolineledbetter.us <img src="img/iu.png" width="7%" align="center" /> carolineledbetter@yahoo.com <img src="img/GitHub-Mark-120px-plus.png" width="5%" align="center" /> @ledbettc <img src="img/Twitter_Logo_Blue.png" width="8%" align="center" /> @C_line_sealion ]