### Dr. Mark Gardener Dr. Christine Gardener

GO...
Gardeners Own Home
Education Home
Other Publications

# Community Ecology

## Analytical Methods Using R and Excel

### by: Mark Gardener

Available now from Pelagic Publishing.

On this page find details about changes to the support material for Community Ecology. These changes will include:

• alterations and improvements to custom R commands
• new custom R commands
• extra exercises

The changes are listed below in date order (newest entries at the top). Alterations will be reflected in the existing support pages, essentially:

• Any altered or additional R commands will be added to the CERE.RData support file and the ZIP Archive found on the Support Files page.
• Any extra data will be added to the Zip Archive (and CERE.RData file if in R-format) found on the Support Files page. Notes about the custom commands will be updated in the Custom Commands page.
• Any extra exercises will be presented on the website (I will make new pages as required).

## NEWS

Jun 2015

New command:

polar.ord()

Get the file: here

Top

## June 2015

### New command to carry out Polar Ordination (aka Bray-Curtis ordination):

polar.ord()

This is a new command that conducts polar ordination (also called Bray-Curtis ordination). The book shows polar ordination and presents a method to carry it out using Excel (Chapter 14). This is labour intensive but instructive for students, as it shows some of the basic principles behind ordination in general. However, I thought it would be useful to have an R command to carry out the procedure.

The command works out polar ordination site scores and works out axes as follows: Axis 1 is the combination of sites that gives the maximum separation (not necessarily the maximum variance explained). Axis 2 is the combination of sites that maximises the orthogonality to the 1st axis.

There are print, plot and summary methods and an identify method for use with plots.

#### Usage

polar.ord(diss)

print.polar.ord(ord, digits = getOption("digits"))

summary.polar.ord(ord, k = 2, cor = TRUE, var.exp = TRUE, digits = getOption("digits"))

plot.polar.ord(ord, x.axis = 1, y.axis = 2, type = c("t", "p", "n"), ...)

identify.plot.polar.ord(pord, labels = pord\$labels, ...)

 diss A dissimilarity matrix e.g. as produced by dist() or vegdist() digits The number of digits to display, defaults to current settings ord The result of a polar.ord command k The number of axes to display cor If TRUE, shows the correlation between ordination axes var.exp If TRUE, shows the variance explained x.axis Which ordination axis to plot on the x-axis y.axis Which ordination axis to plot on the y-axis type The type of plot, "t" text, "p" points or "n" none pord The result of a plot.polar.ord command i.e. a polar ordination plot result labels A vector of labels to use for the sites ... Other plotting parameters to pass to plot or identify

#### Examples

I will post examples in due course in the Custom R Commands page.

#### Get the file

You can get a copy of the .R file here. Click the link to open the text. Right-click and "Save As" to download the file.

#### Use the file

The routines are now added to the main data file. However, if you get the Polar Ordination.R file separately, it opens in any text editor. To install the commands in R use something like:

source(file.choose())

Then select the file. In Linux you'll need to specify the filemane explicitly.

Feb 2015

New commands:

aic()
Iapp()
fisher_alpha()
fisher_fit()

Updated commands:

plot_H()

Imported from vegan 1.17.12:

confint.fisherfit()
plot.profile.fisherfit()
profile.fisherfit()

Support Files

Custom Commands

Top

## February 2015

### Modified command:

plot_H()

This formerly computed bootstrap confidence intervals only (for "shannon" or "simpson"). Now you can specify "shannon", "simpson", or "invsimpson", which use H_CI() and methods using variance estimates. The command calculates the appropriate diversity index and CI, then plots the result.

NOTE: returns an error if you specify boot = TRUE and index = "invsimpson".

### New command:

Iapp()

This compliments the functions Happ() and Dapp(). It calculates bootstrap CI for Inverse Simpson's index ("invsimpson"). Designed for use with apply() and others as an "internal" command.

### New command:

aic()

This is a wrapper for add1() that allows display of potential variables in order of AIC. You can specify order (default: decreasing = FALSE) and number of "results" to display. Specify n = "all" to show all results (the default), or integer to display n results. This is useful when your pool of potential variables (the scope parameter) is large.

### Imported & modified commands from vegan 1.17.12:

Some changes in recent versions of the vegan R-package prompted a few alterations.

### Fisher's log series:

The vegan team removed Std Err calculations from fisherfit(). There are sensible reasons for doing so as CI are somewhat "dodgy". However, to get the same results as the exercises in the book I restored the behaviours. If you want to get the same output as the book then use fisher_alpha() and fisher_fit() in place of fisher.alpha() and fisherfit() commands.

fisher_alpha()

Renamed from fisher.aplha() and restores calculation of se and allows profiling.

fisher_fit()

Renamed from fisherfit(), which allows se calculations and profiling using the following commands restored from vegan 1.17.12.

confint.fisherfit()
plot.profile.fisherfit()
profile.fisherfit()

Publications page

## My books on ecology and data analysis

Statistics for Ecologists is available now from Pelagic Publishing. Get a 20% discount using the S4E20 code!
Beginning R is available from the publisher Wrox or see the entry on Amazon.co.uk.

The Essential R Reference is available from the publisher Wiley now. See it also on Amazon.co.uk.
Community Ecology is available now from Pelagic Publishing.
Managing Data Using Excel is available now from Pelagic Publishing.
Get £5 discount using the MDUE20 code!