Most of the pracs that you will be working on during this semetester will be conducted using R. R is a computer programming language which allows for amazing statistical analyses and graphical outputs. One of the best things about R is that it is “opensource” - that means that anyone can access the underlying code that the language is based on to understand how it works. This is great for development because those who know how to code can then learn the best ways to write code to take full advantage of the language’s capabilities. You can think of R as the Android of the statistics world. Like R, Android is also opensource. Anyone can go and look at how the Android operating system works and anyone can develop an app if they know how. It’s much trickier to do that for iOS, for example.
R is great but it requires a bit of a learning curve. You are most probably used to interacting with a computer through what is called a graphical user interface (A.K.A GUI) but R does not have a GUI. R users interact with R via the console or through scripts - both of which require you to write commands out as text. These are then compiled and run by R and an output is produced. This may seem a little tricky at first as the only thing you are presented with is a blank screen - no menu options and no buttons to click on that can help you remember where you were going but let me assure you that doing statistics by writing out what you want to do will make you a better biologist and statician because you really need to think about what you are going to do. The other down side to R is that everything you do matters - there is no room for error. If you make a spelling mistake your code will not work. If you forget a comma your code will not work. If you forget to capitalise something your code will not work.
Those are just about all the down sides to R. Now on to the upsides:
dplyr
ggplot2
blogdown
There are a whole host of other reasons to use R - some of which you will hopefully realise for yourselves. But for now we will go through some of the basics. This course is designed to teach you population and community ecology and not R. However, an important skill which can help you learn and do population and community ecology better is the R programming language. Unfortunately we do not have enough time together for you to learn R completely but we hope that this course’s practical component will spark an interest in you to try learning R to help you for your future studies.
There are plenty of places to get help with how to use R. An inital place to learn the basics would be the R manual or the beginner’s introduction to R - both provided by CRAN. There are also a host of free resources which are just a google away. More complete and challenging resources might be textbooks such as Hands-on Programming with R. All of these resources (and many more which you will easily find if you look online) are freely available - forever, no strings attached!
Besides written resources there is also a very vibrant community of scientists and programmers on Stack Overflow willing to help solve problems relating to R - provided your describe your problem adequately enough. Other more specific forums include R-sig-ecology and R-nabble.
Besides these online and email based resources are the statistical analyses sections of scientific papers where researchers describe the ways they carried out there analyses. And then there is the help documentation from within R. We will discuss how to use this documentation during our tutorial from Hands-On Programming with R.
Now that we have had a bit of an overview of what R is we will go out of this website and open up Part 1 in Hands-On Programming with R. We will go through this Part 3.11.3.
There will be some aspects of the code that you may not fully grasp and that is okay. These practicals are designed to expose you to both population and community ecology and the R programming language. It does not aim to make you a fully fledged expert on R although I hope that your experience with using R during this course will encourage you to want to learn it more. I understand that some of this code may be quite challenging. If at any time you are really struggling with a particular aspect of the code or are particularly interested in how something works please feel free to contact me and I will be happy to assist you as best I can and within reason (i.e. I will not give you answers to the problems but I will certainly give you suggestions on how to address the problem).
If you would like to download all of the packages we will be using during these practicals you can use the code below:
install.packages("tidyverse", "tidyr", "rmarkdown", "shiny", "deSolve", "viridis", "codyn", "gridExtra", "tibble", "ggthemes", "mvtnorm", "latex2exp", "png", "rmarkdown", "knitr", "kableExtra", "reshape2", "plyr", "tibble")