csasdown
csasdown copied to clipboard
Best practices for directory structure?
If you are hoping to get your full analysis and csasdown in one reproducible directory, is it best to take advice from #3 in the initial setup and have one large project with a sub directory for the analysis and all files that the analysis depends on (e.g. data, models, model fits, etc)?
I don't see much discussion around broader directory structure in the .README or wiki and feel it could be useful for beginners like me. I've been poking around pbs-assess and see how dogfish-assess pulls in the csasdown from "outside" in the report-outside folder, and how the arrowtooth repo does this in the doc folder.
Hoping for some advice here. I previously set up a directory for my analysis then ran csasdown::draft("sr")
within it, and recently noticed I had a project within my broader project. This worked ok for a while until I went to add citations with my zotero addin in R studio, then I began bashing my face on my keyboard...
I think csasdown::draft()
also creating an RStudio project is newer than when much of that readme was written. We should improve the readme around that.
It's fine to have your csasdown folder in the root folder with subfolders there for analyses and data or to have the csasdown files in a subfolder. I tend to prefer the latter.
The latter makes sense to me, which is why I set it up how I did initially. BUT, it doesn't seem like you can plug and play, because csasdown relies on the .Rproj that it creates when you run draft()
? It's easy to back out of the root directory with something like set_here(path='..')
, but I was still having issues with my citr addin... I should just need to make sure that bibliography:
points to the right spot in the YAML header on index.Rmd?
Will restructure repo (I may have done a wrong step somewhere then trying to debug citations) and track any issues that could be suggestions to add to the readme...
In this commit I stopped creating a .here
file, added an option to stop creating an RStudio project file, and edited the README a bit.
You only want one RStudio project. csasdown is fine in a subfolder, although any references to here::here()
will work their way back to the RStudio project file or similar. See here::dr_here()
.