What is R?
R is both a coding language, and an open source software system
R is a sophisticated programming language used and supported by a global community. It is freely available to download from the R project website here
We can use R to check and correct our survey data, run statistical analyses and create figures to illustrate patterns in our data
R is composed of base R, and packages, which are tools and analyses developed by individuals or teams with specialist knowledge, and made available to the community. For example, specialised packages exist for analysing:
- Data on unmarked individuals, such as:
- 📐 Distance sampling - assessing species density and what influences it
- ✅ Occupancy modelling - investigating the spatial distribution of species
- 🎤 Bioacoustic analysis - process and analyuse audio recordings
- Data on known individuals, from:
- 📷 Camera trapping
- 🐭 Capture-Mark-Recapture (CMR)
- 🐟 Environmental DNA (eDNA) - species richness and diversity, detecting rare species
- 🌐 Spatial analysis - exploring patterns in geographic data
Why use R?
So why do we use R? Here are some general reasons:
- It’s free! You don’t need to buy a licence to use it, or break the law by using pirated software
- It’s platform-independent, so it works on Windows, Mac and Unix-based systems
- It’s stable, powerful & versatile
- It includes cutting-edge applications, which are constantly being developed and updated
- It’s based on a simple object-oriented programming language
- It has many built-in functions which can be extended by the user
- It has a strong user community who are willing to offer help and guidance in response to specific questions or problems
Reasons which are of particular relevance to conservationists and researchers:
- It is the standard analysis tool for ecologists and conservationists, enabling you to share code and understand analyses by colleagues and collaborators
- It’s easy to create a record of what you did and adapt the same analysis to new data
- It has very flexible graphics and can make high quality illustrations for professional publications
- You can store commands (functions) for efficient and rapid execution or for editing later. This record helps you remember how you arrived at a particular result, particularly if you add comments explaining what each line of code does!
Barriers to using R
What makes it harder to learn R?
You’re used to spreadsheets
Rather than entering data or formulae into cells, as in a spreadsheet, R is controlled by typing things into the command-line