Should I make an R Project for each assignment or all the assignments at once? #101
Comments
|
I believe @jennybc was advocating against multiple R projects, because then you would have nested R projects which could get messy. If I understood correctly, I believe the advice was simply to have one master R project containing subfolders with their own Your question is mentioned tangentially in the General Homework Guidelines under "Organization of your coursework repository". I was also planning on spending some time looking through The unreasonable effectiveness of GitHub browsability before I got too far down the rabbit hole. |
|
@jennybc |
|
I advocate a one to one to one mapping between:
So @yosukesugishita NO I don't recommend multiple RStudio projects in a single repo. Now conceptually you could have a few "projects". In fact, think your course repo that way. You'll submit some work each week -- definitely separate little projects -- but they live together in one RStudio Project and Git repo. @samhinshaw Thanks for your answer and links. Helpful! @BattaLiu Not sure I completely follow. Am hoping what I said above answers your question? |
|
@BattaLiu I hope this helps, as per the "sample" repository @jennybc showed in the class today. Our repository would look like: MAIN REPOSITORY
Say, we are working in hw2 directory, created R markdown script, hw2.Rmd ; we need to be sure about having this hw2 directory as our current working directory, and everything would go smoothly. Please suggest if this is correct @jennybc |
|
Thank you for your comments, everyone. I was wondering, what's the purpose of having an RStudio project in the first place? |
|
Having an RStudio project is that it helps you to group inputs, outputs and source files and other related files together. If you re-open the project, you can still see history commands. For more detailed explanation, you can read here: https://stat545-ubc.github.io/block002_hello-r-workspace-wd-project.html#rstudio-projects, and here: https://support.rstudio.com/hc/en-us/articles/200526207-Using-Projects |
|
The two main purposes of having an RStudio project, beyond merely having the discipline to designate one directory per R project:
This can mostly be achieved in an RStudio-free way (I was an Emacs + ESS user for > 10 years), but I find the RStudio Project approach is simply slicker. Also, once your Projects start to have additional structure, such as being an R package or a build-able project with a Makefile, I'm pretty sure the RStudio Project-hood is necessary for some of the convenient support RStudio offers. |
Meaning, should I have multiple R projects in my repo or a single R project?
The text was updated successfully, but these errors were encountered: