I tend to structure new project as:
/All_projects/New_project/Code/Github_project_name/Github_project_name.rproj
/All_projects/New_project/Code/Github_project_name/R/scripts.R
/All_projects/New_project/Data/lots of data not synced with github
/All_projects/New_project/Outputs/outputs not synced with github
This allows team members to sync files with my corporate google drive account, and avoids loads of data and other misc crap being synced through github (space issues, format nagging, etc). So far, so good.
One minor wrinkle is here(). I want to use it, I want to love it, but I can't get into it. The docs suggest you can create a .here file and then use here() twice to override the top level directory (i.e. /New_project rather than /New_project/Code/Github_project_name/) but there doesn't seem to be a clear way of doing that, and the docs suggest here() will look upwards until it's satisfied. Since it's already in its R project folder, it's already satisfied.
-
Can I overrule this and use here() better, so that I can then save files to Outputs, import data from Data, etc, without starting each script by specifying loadloc, the location of the root on my system (/home/me/Documents/etc/etc/All_projects/New_project) and having everyone else make their own line for this, before we can all then use file.path(loadloc, "Data") or whatever?
-
Is there a better project organisational structure folks can recommend? Is there accepted best practice in this?
Thanks y'all!