We’re all looking forward to getting together in Des Moines; we want everyone to be ready! This material may be useful to you regardless of your day-zero attendance.

We’re going to have only a short time together in person, so we want to do all we can to help everyone get their computers set up to make it easier for us to collaborate. If you are experienced with R, git, and GitHub, and you are happy with your set-up, you need not do anything.

We plan to do a little bit each week until the Unconf starts:

Just about all of this material was compiled by Dr. Jenny Bryan of RStudio and coworkers, in their book Happy Git and Guthub for the useR. In our material, we will hit the high points, then link to the source material in case you want more background.

Week of April 7

As usual, we have a screencast with details below:

This is our last week of preparation; thanks for your perseverance! Before taking on this week’s work, please make sure you have caught up on the previous weeks.

One of the things I could have made on the video is the choice of git protocol. Let me try to clarify:

  • If you do not have ssh set up to use on GitHub (perhaps because you are new to GitHub), then please set your usethis.protocol to "https".

  • If you are currently set up to use ssh on GitHub, it works for you, and you want to keep using ssh, you may need only to make sure your usethis.protocol is set to "ssh".

Also, if you already have a .Renviron file and/or a .Rprofile file already, the starter files may be useful for you to pick-and-choose things to incorporate into your files.

If don’t already have .Renviron file and/or a .Rprofile file, the starter files may be useful for you to copy in their entirety (while, of course personalizing the name, email, and GITHUB_PAT).

If you are unsure about anything in this video, or run into trouble, please file an issue or email ian [dot] lyttle [at] se [dot] com.

This week, we configure git and GitHub, using the usethis package. It has a fresh, new version on CRAN, so please install it, as well as the reprex package:

install.packages(c("usethis", "reprex"))

Here are some links you might find useful:

Verification

You will know you’re done when you run from the Console:

usethis::git_sitrep()

You’ll get something like this (and you might get some extra stuff, too):

 Git user
 * Name: 'Ian Lyttle'
 * Email: '[email protected]'
 * Vaccinated: TRUE
 usethis + git2r
 * Default usethis protocol: 'https'
 * git2r supports SSH: TRUE
 * Credentials: '<usethis + git2r default behaviour>'
 GitHub
 * Personal access token: '<found in env var>'
 * User: 'ijlyttle'
 * Name: 'Ian Lyttle'

Please make sure that, for you:

Git user:

  • Vaccinated: TRUE

  • Name: is correct

  • Email: is correct

usethis + git2r:

  • Default usethis protocol: either 'https' or 'ssh' (your choice)

GitHub:

  • Personal access token: '<found in env var>'

  • User: is correct

  • Name: is correct

Week of March 31

As usual, we have a screencast with details below:

Review

Thanks again for everyone’s participation, we start this week’s activities with a review, where we encourage that:

✅ your RStudio IDE version is at least 1.2

✅ you have a GitHub account, and have access to your credentials

✅ your R version is at least 3.4

✅ you have git installed on your computer

If you need to catch up, all the details are found in the March 24 and March 17 sections.

devtools

This week’s main activity is to install the devtools package, and to make sure your computer has everything devtools needs.

You can install devtools from your RStudio IDE Console pane:

install.packages("devtools")

If you are on macOS, this should just work. If you are on Windows, you may get a warning that “Rtools is not installed”; if so, don’t worry, we’ll take care of this presently.

Our next step is to test that devtools has everything it needs:

devtools::has_devel(debug = TRUE)

If successful, this function will return silently. On macOS, this should just work.

If you are on Windows, devtools may offer to install Rtools for you; please accept this offer. As well, if the installation process asks you to amend your path, please help it do so. Once the installation process finishes, go back to the Console pane and run again: devtools::has_devel(debug = TRUE); this time it should return silently.

Our last task for the week is to install a package from GitHub. We are going to use the usethis package next week, but we will make sure that devtools can install it now:

devtools::install_github("r-lib/usethis", force = TRUE)

We would not normally use the option force = TRUE; we are doing so here just to make sure that the installation process works. If this returns without an error, you’re done for the week.

If you run into any difficulties, please let us know using this GitHub issue, or if you prefer, email ian [dot] lyttle [at] se [dot] com.

Week of March 24

Thanks everyone for participating last week - if you have not had a chance to refresh your RStudio IDE and GitHub account, we invite you to go through the material, found below.

This week, we focus on installing foundational tools on our computer. Even if you already have R (which should be most of us), it can be useful to check that you are up-to-date:

If you are going to update your R version, you may want to run the following lines to save all the packages you have installed:

mypacks <- installed.packages()
write.csv(mypacks, "~/Desktop/mypacks.csv") # or wherever you want to save them

Then, after installing the new R version, run:

mypacks <- read.csv("~/Desktop/mypacks.csv", stringsAsFactors = FALSE)
install.packages(mypacks$Package)

This should get you most of your packages. You may have to install others from Github one-by-one.

Installing R and git are a little different between Windows and macOS, so we provide a screencast for each. That being said, there were a few things couple of things I would like to emphasize from the videos:

  • I have edited out a lot of the time needed for the installation process, otherwise we would have 30-minute videos! I have edited out a few of the “clicks”, but I have shown explicitly any option you have to confirm is set.

  • Sorry for forgetting to change my Mac’s RStudio IDE from “dark mode”; I’ll remember next time :)

  • If you do have to reinstall your packages, this usually gets me 80% of the way there:

install.packages(c("tidyverse", "rmarkdown", "shiny", "devtools"))

Windows

macOS

Verification

When you get through these steps, you are OK for this week:

R version

From the RStudio IDE Console pane (the R prompt):

R.version.string
## [1] "R version 3.5.2 (2018-12-20)"

If your version is at least 3.4, you’re OK.

Git version

From the RStudio IDE Terminal pane (access to your computer itself):

git --version

Your response should look something like this:

Windows:

git version 2.21.0.windows.1

macOS:

git version 2.17.2 (Apple Git-113)

If you run into any problems, and are an Uncoast Unconf participant, you can check, then create a new GitHub issue at the day-zero repository, or email Ian Lyttle at ian [dot] lyttle [at] se [dot] com.

Week of March 17

This week, we focus on a couple of tools:

With the RStudio IDE, we recommend using the Preview version. This way, the the buttons and tabs on your IDE will be similar to the buttons and tabs on our IDE.

If you want to get a head-start on next week’s activity, you can make sure that your R version is at least 3.4.0:

For your GitHub account:

  • if you do not have an account already, please sign up for one. For our purposes, you will not need anything other than a free account. Please keep your login-credentials handy.
  • if you do already have an account, please make sure you have access to your login-credentials, i.e. you can enter them into the GitHub login page.

As you might imagine, you will need your login-credentials going forward.

With each week’s exercise, we plan to release a screencast video where we go through the steps ourselves.

Special thanks to Sam Tyner and Amelia McNamara for providing feedback on drafts of this video; Amelia provided a script I was able to use verbatim: right at the start, where I’m asking for questions.

Having watched the video, I may have glossed over a few things, so I want to emphasize that:

  • Winston and Binford are Basset Hounds, and will make noise as they please :)
  • if you have version of RStudio IDE 1.2 or greater, you are likely just fine - I am installing the newest version just to make the demonstration.
  • the preview version that RStudio makes available, if and when you make your installation, may well be later than the version shown in the video - this is OK.

If you want to pick-and-choose topics:

  • Introduction: 0:00
  • RStudio IDE, macOS: 2:19
  • RStudio IDE, Windows: 5:22
  • GitHub account: 8:04
  • GitHub issues: 9:08
  • Summary: 11:21

Verification

When you get through these steps, you are OK for this week:

  1. With your (new) version of the RStudio IDE, open the Terminal pane, type the command date, then enter. Your computer should return the current date or date-and-time. If you are on Windows, and are asked to enter a new date, just hit enter.

  2. Having signed into GitHub, go to this issue on our issues page, either to introduce yourself, or to add an emoji reaction. Once you have done this, you are very welcome (in fact, encouraged) to participate in some of the other issue discussions at the main Uncoast Unconf repository, or even start new ones.

If you run into any problems, and are an Uncoast Unconf participant, you can check, then create a new GitHub issue at the day-zero repository, or email Ian Lyttle at ian [dot] lyttle [at] se [dot] com.