This question is relevant if you received an error message like the one below:
Solution: Git Pull. In the upper right box of RStudio select “Git” and then click the “Git Pull arrow” as seen in the red box below.
Now you should be able to push.
Why did this error occur?
This error occurs when the repository is changed remotely. In other words, the GitHub repostiory contains content that you do not have on your local file system. For example, if you go to the repository and change the README file and commit your changes, you will receive this error and need to pull the remote changes before you can push your local changes again.
This question is relevant if you received an error message like the one below:
Solution:
Change the top of the code chunk to: {r county-most-nativeam}
. Notice the space between r
and the chunk-name.
Why did this error occur?
Code chunks in RStudio need to be explicitly told what language of code to run. In other programming contexts this information is sometimes referred to as a “shebang”. This is why code chunks begin with {r chunk-name}
. It is important for there to be a space after the r
. If the chunk deviates from this format, you may encounter /bin/sh : 1
error.
This question is relevant if you received the following error when you tried to push:
Next, you git pull (the down arrow in the upper right) and receive the following error: “Automatic merge failed”
When you look at your
.Rmd
, the following lines show up:
<<<<<<<< (HEAD)
# YOUR CODE
============
# REMOTE CHANGES TO CODE
>>>>>>>>>> Commit Hash
like in the image below.
The solution is:
.Rmd
to look like you want it togit commit -m "merge fixed"
and press enterSee the picture below for details.
Checklist:
Are all pages appropriately linked on Gradescope?
Is your name (and your team’s name) on your document?
Did you commit >3 times? (Check your repo on GitHub)
Did every team member commit? (Also check on GitHub)
Is every code chunk named?
For tidyverse style guidelines:
%>%
and ggplot layers +
should be followed by a new lineClick here for a full list of tidyverse style guidelines.