Welcome to the pre-workshop prep page!
Please follow these instructions to download and install the necessary software and files on your laptop before the workshop. All this will take some time, perhaps around 15-30min, depending on your prior familiarity with software installation and R.
Note that it is not enough to have just R and tidyverse installed (which you might have) - you will also need a number of packages and a worksheet file, and your R and RStudio should be up to date. The instructions below come with troubleshooting steps - if something seems to be amiss or not working as intended, make sure you’ve read through everything.
Importantly, if something went wrong and you could not install the software, please get in touch before the workshop starts so we can try to troubleshoot (“just watching” in the workshop is not an option, I want to teach you how to actually do some things - things you can and will immediately apply in the hackathon following the workshop). In the end of this page is a confirmation form - this will also be used as a final check that you’re intending to participate; if I don’t receive that final confirmation (step 5), then I will have to assume that you’ve cancelled your registration.
Good luck!
- Andres Karjus
This document contains step-by-step instructions for:
All steps are mandatory and must be completed before the workshop starts. Step 1 can be skipped if (and only if) you’ve very recently installed R and RStudio. There’s a known conflict between newer versions of R and older versions of RStudio (pre-1.4.1717), so you’re quaranteed to crash if you update one but not the other.
The installation process only takes a few clicks. But before you start, please make sure your operating system is up to date as well (particularly Macs: there are known conflicts between old versions of R and some newer packages, which will manifest if you have a Mac with an very old version of the Mac OS, which in turn would lead you to download an old version of R). If you had an older R version installed already, please check after updating that RStudio is actually using the newest one (in Global Options -> R Version)
First and foremost, you need R. If you already have R installed, please still update it to the most recent version, i.e. 4.1.2
. Updating is done simply by downloading the most recent installer and running it Depending on your operating system, go to:
If you have an older R and/or RStudio installed, close both applications. Download the new installer and install (with default options, just keep clicking Next). Run R once to check that it works (something like Rgui.exe
or R x64.exe
should appear as a shortcut in the start menu and/or desktop; on a Mac, look for the R application in Finder). It should look something like this, depending on your OS:
Good job. Now close R (if it asks to save the workspace, say no). This is the last time you see this interface, RStudio is much nicer :)
While it is ok to use R from the command line or the bare-bones Rgui application, we are going to use RStudio instead, which will make using R a lot easier and less of a hassle. It also has nice support for RMarkdown, which we will be making use of.
Common issues and troubleshooting - only if you encountered any errors, otherwise skip:
Run the RStudio application. We need to change one option to make it behave in a more useful way for us (fortunately, the RStudio interface is highly customizable).
Soft-wrap R source file
. This will make using the script editor much easier, by wrapping long lines so you won’t have to keep scrolling left and right all the time.Show output inline for all R Markdown documents
(i.e. make sure the tick box is empty). This will disable notebook-style plot previews in the script editor and show plots in the Plots pane.Rainbow parentheses
You will need to download this .Rmd script file for the workshop: click here to save the file (if it doesn’t work, you might need to right click and choose Save As or similar).
This little section contains some basic FAQ and tips. Read through it during package installation. Leave this webpage open - so that if you get stuck or confused while working on an exercise, you can easily come back here and see if it contains a solution for your issue. Reading through this right now might seem a bit pointless at first if you’re new to R or programming in general - but the idea is to have some memory of the common issues in the back of your head, so once you will see you first error message (and you will at some point), it will look familiar and you’ll know where the solution can be found.
Most common issues you will run into as a beginner:
(it’s ok we’ve all been there)
+
sign on the last line of the Console instead of >
and nothing is happening, or weird stuff is happening.
+
indicates the Console is expecting more input, but you don’t get an explicit error message. It usually means you forgot to close brackets (e.g. sum(data[1:3
) or have some other typo in the code (+
at the end of the last ggplot layer maybe?). So whenever you see a lonely + sign in the Console and nothing works anymore, just place the cursor in the Console and press the ESC key in the top left of your keyboard to cancel execution; then find the error in your code (usually a missing comma or bracket )
]
or a trailing +
) and try again.library()
command to load the package that includes the missing function. But it could also be that you misspelled the name of the function. Easy way to check: see if there’s a help file for the function you’re trying to run (find the Help pane on the right in RStudio). library()
giving you a “package not found” error), then go back to that step and install. ```
- the common reason being, like with the previous issue, is that you have an unfinished line just before the end of the block, often a missing )
or an extra +
at the last line of a ggplot call - just add the missing bracket or remove the trailing +
and try again. #
in front of it. Also keep this webpage open in your browser during the workshop so you have easy access to these troubleshooting tips! Maybe even have another look at this list of error messages if you happen to have a free moment just before the workshop starts.
Almost done. Just enter your name below so I have an overview how many are coming to the workshop well prepared (hopefully that’s everybody:)
If I don’t see your name there by Thursday morning, I will assume that you have cancelled your registration.
If you were unable to complete one of the steps, please get in touch with me via email this week before the workshop so we can troubleshoot, I’m happy to help!
(if the form doesn’t load properly on this page, click here to go to the full form)