Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Best practices for directory structure? #243

Open
DylanMG opened this issue Nov 8, 2023 · 3 comments
Open

Best practices for directory structure? #243

DylanMG opened this issue Nov 8, 2023 · 3 comments

Comments

@DylanMG
Copy link

DylanMG commented Nov 8, 2023

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...

@seananderson
Copy link
Member

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.

@DylanMG
Copy link
Author

DylanMG commented Nov 9, 2023

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...

@seananderson
Copy link
Member

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().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants