Happy Git with R

Happy Git with R
Author

Haoming Wang

Published

February 2, 2023

Prompt:

git and Github are tools for helping with versioning of files in collaborative efforts as well as archiving entries for your future self. Unfortunately working with git isn’t always completely straightforward. Jenny Bryan’s book “Happy git and github with R” helps with that. The book is available from http://happygitwithr.com/. Have a look over the index and pick one of the chapters for a more in-depth read.

Write a blog post answering the following questions:

  1. Write a short (100-150 words) summary of the chapter you read in-depth.

I read the Chapter One of “Happy git and github with R”. After reading this chapter, I had an overall idea of the purposes of using Git and GitHub to improve our R programming experience. I have learned that, with GitHub, not only can we collaborate with our colleagues on projects in a more convenient way, but we are also provided a real-time backup and a record of our work progress. This backup helps us easily pick up our previous work, and the record of our work progress makes the bugs easier to be detected in case we fail to get a desired result. Another interesting point about GitHub that I learned from this chapter is Pull Requests. I found it useful especially for developing those complex packages with many different functions.

  1. Looking back at all of the team projects you have been involved in, describe the biggest mishap you had. Could that have been avoided using git? How?.

Once I had a project that requires me to generate some training data and use it to train a neural network model. I created two R script files, one for my training data and another for my neural network training model. After I generated my data, I forgot to save it in my local file and I directly used it to train my model. Since the data was quite large, the neural network training took me about 40 minutes. As R finished training my model, it suddenly crashed and I failed to save all my data and model which was very annoying. However, with git, although I might fail to save my model locally if my R crashes, I still have my codes and I can immediately get my training data by running the codes. In this case, it would take me much less time to restore all my work and model.

  1. Give an example of one new git feature that you learned about from Jenny Bryan’s book..

One new git feature I learned about is the user’s ability to track the package development and do their own modifications as the proposed changes. This feature provides me a platform to get a closer look at those packages I frequently use. After knowing that I am also able to do some modifications to make them better, I am also motivated to thoroughly understand the functionality of those famous packages.