2.3 Additional resources (optional)

In order to get the most out of this guide, it’s helpful (but not essential) if you have some programming experience already. If you’ve never programmed before, you might find Hands-On Programming with R (Grolemund 2014) to be a useful primer.

There are three things you need to run the code: R, RStudio, and collection of R packages. Packages are the fundamental units of reproducible R code. They include reusable functions, the documentation that describes how to use them, and sample data.

Gladly, once you’ve reached this point successfully, these three things are set already. Nevertheless, we will have to install and load a few new packages at some place in this guide, for which you can use the install.packages() the same way as you did before.

Throughout the guide, a consistent set of conventions is used to refer to code:

  • Functions are in a code font and followed by parentheses, like sum() or mean().
  • Other R objects (like data or function arguments) are in a code font, without parentheses, like seTE or method.tau.
  • Sometimes, we’ll use the package name followed by two colons, like meta::metagen(). This is also valid R code. This is used so as to not confuse the functions of different packages with the same name.

2.3.1 Getting Help

As you start to apply the techniques described in this guide to your data you will soon find questions that the guide does not answer. This section describes a few tips on how to get help.

  • If you get stuck, start with Google. Typically, adding “R” to a search is enough to restrict it to relevant results: if the search isn’t useful, it often means that there aren’t any R-specific results available. Google is particularly useful for error messages. If you get an error message and you have no idea what it means, try googling it. Chances are that someone else has been confused by it in the past, and there will be help somewhere on the web. (If the error message isn’t in English, run Sys.setenv(LANGUAGE = "en") and re-run the code; you’re more likely to find help for English error messages.)
  • If Google doesn’t help, try stackoverflow. Start by spending a little time searching for an existing answer; including [R] restricts your search to questions and answers that use R.
  • Lastly, if you stumble upon an error (or typos!) in this guide’s text or R syntax, feel free to contact Caspar van Lissa at c.j.vanlissa@uu.nl.




References

Grolemund, Garrett. 2014. Hands-on Programming with R: Write Your Own Functions and Simulations. O’Reilly.