Fortifies an object of class "cca" to produce a data frame of the selected axis scores in long format, suitable for plotting with ggplot.

# S3 method for cca
fortify(
  model,
  data,
  axes = 1:6,
  display = c("sp", "wa", "lc", "bp", "cn"),
  ...
)

Arguments

model

an object of class "cca", the result of a call to cca, rda, or capscale.

data

currently ignored.

axes

numeric; which axes to extract scores for.

display

numeric; the scores to extract in the fortified object.

...

additional arguments passed to scores.cca, and scores.rda.

Value

A data frame in long format containing the ordination scores. The first two components are the axis scores.

Details

TODO

Author

Gavin L. Simpson

Examples

data(dune)
data(dune.env)

sol <- cca(dune ~ A1 + Management, data = dune.env)
head(fortify(sol))
#>     score    label       CCA1       CCA2       CCA3        CCA4        CA1
#> 1 species Achimill  0.2148956  0.6791166 -0.2244523  0.36922857  0.5675090
#> 2 species Agrostol -0.1213250 -0.7574756  0.2775783 -0.03523410 -0.5799404
#> 3 species Airaprae -1.8379217  0.8876801  0.7707220 -0.60764105  2.1380074
#> 4 species Alopgeni  0.5378414 -0.6600444  0.4651552 -0.07371563 -0.1991750
#> 5 species Anthodor -0.3771475  0.5807899 -0.2313703 -0.21281154  1.1869495
#> 6 species Bellpere  0.1411665  0.2279161  0.1843069  0.51485941  0.2352670
#>          CA2
#> 1  0.4127753
#> 2 -0.2138080
#> 3 -1.5906586
#> 4 -0.5489354
#> 5 -0.2081577
#> 6  0.7116896