Creates and initializes an R project directory with a standard folder structure and starter R scripts. If the requested directory does not exist, it is created recursively. Existing files and directories are preserved and skipped.
Details
The project contains the following structure:
<project>.Rproj– RStudio project fileraw-data/– raw input datadata/– processed dataR/– R source codedocs/– project documentationfigures/– generated figuresR/learning.R– learning or exploratory codeR/clean_script.R– data-cleaning code
The function temporarily changes the working directory to the project directory while creating the project structure and restores the original working directory on exit.
