points.coca: Add points to a Co-CA plot

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Draws points on the current graphic device based on in supplied coca model object.

Usage

1
2
3
4
## S3 method for class 'coca'
points(x, display = c("sites", "species"),
       which = c("response", "predictor"), choices = c(1, 2),
       scaling = FALSE, select, ...)

Arguments

x

an object inheriting from class coca.

display

character; one of the stated choices. Indicates which scores to use to draw points.

which

character; one of the stated choices. Indicates which of the response or predictor data sets is used to select scores from.

choices

The Co-CA axes to draw points for.

scaling

logical; should species scores in a symmetric Co-CA be rescaled?

select

Items to be displayed. This can either be a logical vector which is TRUE for displayed items or a vector of indices of displayed items.

...

Arguments passed to other methods

Details

The visual appearance of the plotted points can be controlled by supplying appropriate graphical parameters via the ... argument. See par for details.

Value

Returns the plotted x and y coordinates as a matrix.

Author(s)

Gavin L. Simpson

See Also

plot methods; plot.predcoca and plot.symcoca.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## symmetric CoCA
data(beetles)
data(plants)
     
## log transform the bettle data
beetles <- log(beetles + 1)
     
## fit the model
bp.sym <- coca(beetles ~ ., data = plants, method = "symmetric")

## draw a biplot of the response
plot(bp.sym, type = "none")
points(bp.sym, display = "sites", col = "blue", pch = 16)
points(bp.sym, display = "species", col = "red", pch = 3, cex = 0.8)

Example output

Loading required package: vegan
Loading required package: permute
Loading required package: lattice
This is vegan 2.5-4
some species contain no data and were removed from data matrix y

some species contain no data and were removed from data matrix x

cocorresp documentation built on May 2, 2019, 5:16 p.m.