Learn R Programming

labdsv (version 2.1-0)

ordneighbors: Nearest Neighbors Plotted in Ordination Space

Description

For each sample unit in an ordination, for each of n nearest neighbors, draws an arrow from the sample unit to its n neighbors.

Usage

ordneighbors(ord,dis,numnbr=1,ax=1,ay=2,digits=5,length=0.1)

Value

Additional information is plotted on an existing ordination and summary information is printed. Returns an (invisible) list of summary values.

Arguments

ord

an ordination object of class ‘dsvord’ from pca, pco, nmds, fso

dis

an object of class dist

numnbr

the number (order) of nearest neighbors to plot

ax

the dimension t plot on the X axis

ay

the dimension to plot on the y axis

digits

the number of digits to report

length

the length of the arrowhead

Author

David W. Roberts droberts@montana.edu

Examples

Run this code
data(bryceveg) # produces a vegetation data.frame
dis.bc <- dsvdis(bryceveg,'bray/curtis') # creates a Bray/Curtis 
                                         # dissimilarity matrix
pco.bc <- pco(dis.bc,2) # produces a two-dimensional Principal 
                        # Coordinates Ordination object
plot(pco.bc)
ordneighbors(pco.bc,dis.bc)

Run the code above in your browser using DataLab