Learn R Programming

labdsv (version 1.2-0)

dga: Direct Gradient Analysis

Description

Direct gradient analysis is a graphical representation of the abundance distribution of (typically) species along opposing environmental gradients

Usage

dga(z,x,y,step=25,pres="+",abs="-",labcex=1,
    xlab = deparse(substitute(x)), ylab = deparse(substitute(y)),
    pch = 1, title = "", ...)

Arguments

z
the variable (typically a species abundance) to be plotted
x
the variable to use as the x axis
y
the variable to use as the y axis
step
controls the grid density fed to the GAM surface fitter
pres
the symbol to print when a species is present (presence/absence mode)
abs
the symbol to print when a species is absent (presence/absence mode)
labcex
the character size for contour labels
xlab
the x axis legend
ylab
the y axis legend
pch
the symbol to print in continuous abundance plots
title
the title to print
...
miscellaneous arguments to pass to par

Value

  • a graph of the distribution of the z variable on a grid of x and y is displayed

Details

dga interpolates a grid of x,y values from the supplied data and fits a GAM (from mgcv) of the z variable to the grid. The GAM surface is then represented by a contour map and abundance symbols as described above.

References

http://ecology.msu.montana.edu/labdsv/R

See Also

gam

Examples

Run this code
data(bryceveg) # returns a data.frame called bryceveg
    x <- c(0.2,0.5,1.0,2.0,3.0,4.0,5.0,6.0)
    y <- c(0.2,0.5,3.0,15.0,37.5,62.5,85.0,97.5)
    cover <- vegtrans(bryceveg,x,y)
    data(brycesite)
    dga(round(cover$arcpat),brycesite$elev,brycesite$av)

Run the code above in your browser using DataLab