Continue to practice RMarkdown.
Continue to practice collaboration on GitHub.
Learn to use “Issues” and “Projects” features on GitHub for project management.
Make a version-controlled CV.
Please join the lab-chat
channel on Slack for communication during the lab.
In Lab 1, you started to create a CV using RMarkdown, but we did not have much time to work on it. Today, you will have more time to continue this exercise and you’ll get your CV version-controlled on GitHub.
Before you start, please create a new GitHub repo named cv-yourname
(replace yourname
with your name), clone the repo to your computer, and work on your CV in this new repo. If you already have a draft CV from Lab 1, feel free to copy this draft to your new repo.
IMPORTANT NOTE: For the next exercise, you will be paired with another student to peer review the CVs that you have just made. Therefore, if you do not feel comfortable sharing your own CV, feel free to make a CV for one of your favorite scientists or a fictional character instead.
After you are done with this exercise, please make a few obvious typos (~5) in the document, knit it, and commit and push the final version to GitHub.
For this exercise, we will create three types of breakout rooms: interactive, quiet, and solitary.
You will be able to choose your own rooms, but don’t join a room if it already has more than four people.
Here are some suggested activities you can try with your CV. You don’t have to complete all of them; just pick the ones that seem most interesting to you.
Center some section titles, e.g., md <center> **Centered and bolded text (HTML)** </center> \center __Centered and bolded text (PDF)__ \center
or, for HTML output only, you can add the following code chunk to center level 1-3 headers
```{css, echo=FALSE}
h1, h2, h3 {
text-align: center;
}
```
Right align some text, e.g.,
Aligned left (HTML) [*Aligned right and italic (HTML)*]{style="float:right"}
Aligned left (PDF) \hfill _Aligned right and italic (PDF)_
Add some line dividers and/or space between sections, e.g.,
---
<br>
Add bullet points and/or numbered lists, e.g.,
* level 1
* level 2
1. item 1
2. item 2
Format certain text in bold, italic, and underline, e.g.,
***Bolded and italic text (HTML or PDF)***
___Bolded and italic text (HTML or PDF)___
<ins> Underlined text (HTML) </ins>
Insert a picture of yourself at a select location in the document, e.g.,
```{r, fig.align="center", eval=TRUE, echo=FALSE}
knitr::include_graphics("https://www.nydailynews.com/resizer/sQ6gQYnTk2r34Qfvp62cZotsZFE=/415x276/top/arc-anglerfish-arc2-prod-tronc.s3.amazonaws.com/public/O4TVS77I2W4OWA2UCLZP34EM4Q.jpg")
```
or, for HTML output only, the following syntax also works
<center>![](https://www.nydailynews.com/resizer/sQ6gQYnTk2r34Qfvp62cZotsZFE=/415x276/top/arc-anglerfish-arc2-prod-tronc.s3.amazonaws.com/public/O4TVS77I2W4OWA2UCLZP34EM4Q.jpg)</center>
Knit the same Rmd file in different ouput formats and compare the results, or start a new Rmd file for outputting in a different format.
Use a CV template. If you have LaTeX installed on your computer, this template can be a great one. Here is an example of its output. If you would like to get a lightweight version of LaTeX installed that will let you knit to PDF, here are some instructions (the process could take some time though).
For PDF output only, add your favorite equation.
Use Google to find and add one or more features to your CV that are not mentioned in this list.
Remember to push your changes to GitHub at regular intervals and when you wrap up this first part of the exercise.
Issues and projects are useful GitHub features that can facilitate your project management, especially in collaborative projects. They can be used for providing feedback, making plans, assigning tasks, and tracking progress. We will first do a quick demo before you start your exercise, but here is a good tutorial for these features.
For this exercise, you will collaborate with a partner to peer review the CVs you just made.
Add your partner as a collaborator for your CV repo. Then, clone your partner’s repo to your computer using RStudio.
We will randomly assign pairs of students into breakout rooms. Please let us know in advance if you have a preferred partner for this exercise.
It is recommended that you go through your peer review process in the following steps.
Use the intentional typos as an opportunity to practice how to resolve merge conflicts, and how to avoid them when possible.
Rmd
file in slightly different ways. Do not knit the Rmd
file yet. Then, both partners can commit their changed Rmd
file. One partner can push first, and the other partner will pull, and will get a merge conflict. They can then address this merge conflict, knit, push the resolved version to GitHub, and the other partner can pull. After this, partners can switch roles.Rmd
file. Similarly, neither should knit at this point. Again, they will both commit their changes, one partner will push first, and when the other pulls, the changes should be merged automatically. They can now knit, push, and the other partner can pull.In the previous step, we emphasized that neither partners should knit their changed Rmd
file before pulling other’s changes. This is because conflicted versions of Rmd
files can usually be merged without too much of a hassle, but with the knitted markdown
, html
, or pdf
files, you might get unwieldy merge conflicts because of different system configurations between partners. There is, however, a very simple fix to this: the partner who has received the unwieldy merge conflict could just deleted the knitted output, and reknit the Rmd
file once merge conflicts (if any) are resolved. Now, try step 1a again, but both partners can knit this time.
Use the GitHub’s Issue feature to provide feedback to your partner on their CV.
Create a GitHub Project under the CV repo, and assign the Issues to your partner as a “to-do” item in this project.
Revise your CV according to the feedback from your partner, and respond and close the Issue when the feedback is resolved.
If there is still some time left after you have finished all the steps above, you can either take more time to practice your collaboration skills, or start working on this week’s assignment.
Share your findings, challenges, and questions with the class.
END LAB 2