plot.vf: Plots fitted vectors onto an ordination diagram

Description Usage Arguments Value Author(s) See Also Examples

View source: R/plot.vf.R

Description

Add vector fitting arrows to an existing ordination plot.

Usage

1
2
## S3 method for class 'vf'
plot(x, pval = 1, cex = 0.8, ascale = 0.9, ...)

Arguments

x

an object of S3 class vf, created by vf()

pval

optional, critical p-value for choosing variables to plot

cex

text size

ascale

optional, proportion of plot area to use when calculating arrow length

...

optional, other graphics parameters

Value

Adds arrows to an existing ordination plot. Only arrows with a p-value less than pval are added. By default, all variables are shown.

Author(s)

Sarah Goslee

See Also

vf

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Example of multivariate analysis using built-in iris dataset
data(iris)
iris.d <- dist(iris[,1:4])

### nmds() is timeconsuming, so this was generated
### in advance and saved.
### set.seed(1234)
### iris.nmds <- nmds(iris.d, nits=20, mindim=1, maxdim=4)
### save(iris.nmds, file="ecodist/data/iris.nmds.rda")
data(iris.nmds)

# examine fit by number of dimensions
plot(iris.nmds)

# choose the best two-dimensional solution to work with
iris.nmin <- min(iris.nmds, dims=2)

# fit the data to the ordination as vectors
### vf() is timeconsuming, so this was generated
### in advance and saved.
### set.seed(1234)
### iris.vf <- vf(iris.nmin, iris[,1:4], nperm=1000)
### save(iris.vf, file="ecodist/data/iris.vf.rda")
data(iris.vf)
plot(iris.nmin, col=as.numeric(iris$Species), pch=as.numeric(iris$Species), main="NMDS")
plot(iris.vf)

ecodist documentation built on July 13, 2017, 9:02 a.m.