eco-evo-thr-2022 / 07-github-rmarkdown

GitHub and RMarkdown
0 stars 10 forks source link

Intro to Github #3

Open sarahcrisley opened 2 years ago

sarahcrisley commented 2 years ago

Nice, simple breakdown of Github applications and terminology--very helpful! I also think it's super cool how Github can be used to share code linked to manuscripts (now if we could only finagle a way to get whole manuscripts open access on there, too!).

A few questions:

ajrominger commented 2 years ago

Great questions Sarah! I know some of this got covered in class, but I also wanted to write out a few thoughts:

sarahcrisley commented 2 years ago

Hey Andy!

So sorry for the delay--looks like I've been slacking on checking my personal email these days! Thank you for answering my questions with such a thoughtful, detailed response. This is super helpful insight and I'm excited to get my GitHub phase rolling. Thanks again!

Sarah

On Wed, Oct 5, 2022 at 2:25 PM Andy Rominger @.***> wrote:

Great questions Sarah! I know some of this got covered in class, but I also wanted to write out a few thoughts:

  • for naming and organization, I follow a pretty strict protocol aimed at making any repo be able to become an R package (I do that because R packages have really useful structure for staying organized, even if you're not releasing your code as a package); the protocol is:
    • repo name is characters only (no '_' or '-' or numbers)
    • sub folders in repo are:
      • data (where read-only data live)
      • R (where R functions--but not R scripts live)
      • man (where help documents about the functions in R live)
      • inst (where intermediate data sets and scripts live, e.g., i wrote a script to read in data from the data folder and then I wrote out some manipulated version of those data for later analysis...all those files live in inst)
      • manuscript a folder for the manuscript, written as a .Rmd
    • naming conventions for files within those sub-folders is a little less strict, but I generally like to use '_' between words in file names, and I name files that hold functions after the function name (e.g. if there's a function named myFun it would live in a file named myFun.R
  • my personal journey with switching over to github:
    • first off, awesome that you're looking to do that too!
    • i definitely did not start with moving the "back-log" of code into github, but rather (just like you suggest) i made the switch by starting new projects with github first
    • additionally, if I had an existing project not on github, but I needed to make the code available to go with a publication, that was great motivation to move that code to github
    • finally for the back-log of code: as time permited (which it usually didn't) a project I found very useful to my own learning about R, packages, and github was to convert some of my favorite pieces of R code into a personal package of "helper functions" that is mostly intended for my own use, but hypothetically I could share with others; that's here https://github.com/ajrominger/socorro

— Reply to this email directly, view it on GitHub https://github.com/eco-evo-thr-2022/06-github-rmarkdown/issues/3#issuecomment-1268789245, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASTNJOJIXQA25LXKRWNDVMLWBXBYBANCNFSM6AAAAAAQ27SUIA . You are receiving this because you authored the thread.Message ID: @.***>

-- Sarah Risley @.*** | 615.585.2310