Skip to main content

4.2 Should I use PRIMER or R? (in short)

Use Both!

The take-home message here is: use both! Neither replaces the other. They are good at different things.

  • R is a wonderful programming language and is very flexible and general. You can use it to do heaps of stuff, but it is difficult to use well. Depending on the package, you cannot always trust it without doing a lot of additional checks. It is easy to make mistakes - you need to debug your code and make sure you use existing packages within their scope. Correct functioning may depend on context and can also vary over time.
  • PRIMER is an excellent software package with a narrower focus. What it does, it does exceptionally well. It specialises in performing a suite of robust multivariate methods, many of which are simply not available in R (or any other software). It is very easy to use and you can trust the results.

When do I use what?

In my own work, I use PRIMER first and foremost for all the stuff that it can do and is really good at, not just because it is easier (which is reason enough), but also because I know I can trust the results. I use R for most other things, and with few exceptions I program and de-bug my own R code. Breaking this down into some concrete recommendations:

Use PRIMER (with PERMANOVA+) for:

  • Robust dissimilarity-based multivariate analysis in general
  • Non-parametric methods
    • ANOSIM, BEST, RELATE, MDS, CLUSTER, ... etc.
  • Semi-parametric methods
    • PERMANOVA, PERMDISP, DISTLM, dbRDA, CAP, ... etc.
  • other methods unique to PRIMER (or better-implemented or easier to run in PRIMER)
    • Second-stage MDS, threshold-metric MDS, BVSTEP, LINKTREE, SIMPROF, custom-ordered shade plots, segmented bubble plots, biodiversity metrics, taxonomic distinctness, functional resemblance, ... etc.

Use R for:

  • Running routine classical stats
  • Programming bespoke data wrangling
  • Tailoring graphics
  • Creating and testing new statistical ideas or methods
  • Running a specific analysis/method using a package that you know, trust and have checked thoroughly for your particular application or context.
  • Running simulations, etc.

I sincerely hope that this contribution will help researchers get the most from their software tools for data analysis. The focus of this exposé has been exclusively on PRIMER and R, as the specific question 'Should I use PRIMER or R?' seems to keep bubbling up. There are clearly a large number of other statistical software options out there (with their own pros and cons) and I would encourage researchers to explore them as well, with an open mind.