::use_git_config(
usethisuser.name = "Your name",
user.email = "Email associated with your GitHub account")
Computing access
Not that we will go through this as a call and on your first homework. Feel free to revisit it here if you need to.
R & RStudio
It is highly recommended that you install R and RStudio on your own personal computer. Follow the directions here to install R and RStudio on your computer
If, for some reason, you are unable to use R or RStudio on your personal computer, you may use the College of Idaho’s RStudio Server. However, I do not recommend you do this as I want you to practice installing packages in this course and you do not have the permissions to do that on the server. If you must use the RStudio Server, please notify Dr. Friedlander immediately.
Git & Github
You need to create a GitHub account. You may want to use this to show-off work to future employers so I recommend using something professional (like your name) as your user name. Once you have done this, email it to Dr. Friedlander so he can add you to the GitHub Classroom.
Set up your SSH Key
You will authenticate GitHub using SSH. Below are an outline of the authentication steps.
You only need to do this authentication process one time on a single system.
- Step 0: Type
install.packages("credentials")
into your console. - Step 1: Type
credentials::ssh_setup_github()
into your console. - Step 2: R will ask “No SSH key found. Generate one now?” Click 1 for yes.
- Step 3: You will generate a key. It will begin with “ssh-rsa….” R will then ask “Would you like to open a browser now?” Click 1 for yes.
- Step 4: You may be asked to provide your username and password to log into GitHub. This would be the ones associated with your account that you set up. After entering this information, paste the key in and give it a name. You might name it in a way that indicates where the key will be used, e.g.,
mat427
)
You can find more detailed instructions here if you’re interested.
Configure git
There is one more thing we need to do before getting started on the assignment. Specifically, we need to configure your git so that RStudio can communicate with GitHub. This requires two pieces of information: your name and email address.
To do so, you will use the use_git_config()
function from the usethis
package. You will need to install the usethis
package in the same way you installed the credentials
packages above.
Type the following lines of code in the console in RStudio filling in your name and the email address associated with your GitHub account.
For example, mine would be
::use_git_config(
usethisuser.name = "EricFriedlander",
user.email = "efriedlander@collegeofidaho.edu")
You are now ready interact between GitHub and RStudio!