Skip to contents

tidy() returns one set of ordination scores as a tibble, and glance() a one-row summary of the ordination.

Usage

# S3 method for class 'td_ordination'
tidy(
  x,
  display = c("sites", "species", "vectors", "centroids", "axes", "envfit"),
  ...
)

# S3 method for class 'td_ordination'
glance(x, ...)

Arguments

x

A td_ordination from ord_fit().

display

Scores to return: "sites", "species", "vectors" (environmental arrows), "centroids" (factor levels), "axes" (eigenvalues and variation explained) or "envfit" (fit of passive variables).

...

Not used.

Value

A tibble.

Examples

ord <- ord_fit(png_frogs, method = "ca")
tidy(ord, "species")
#> # A tibble: 55 x 4
#>    species   axis1    axis2   axis3
#>    <chr>     <dbl>    <dbl>   <dbl>
#>  1 FR01    -0.983   0.702   -0.467 
#>  2 FR02    -0.619   0.00967  0.321 
#>  3 FR03     0.367  -1.30     0.774 
#>  4 FR04    -0.0481 -0.955    1.07  
#>  5 FR05     0.367  -1.30     0.774 
#>  6 FR06     0.128  -1.10     0.944 
#>  7 FR07     1.22   -0.521   -1.98  
#>  8 FR08    -0.818   0.347    0.0591
#>  9 FR09     1.22   -0.521   -1.98  
#> 10 FR10     1.20   -0.536   -1.93  
#> # i 45 more rows
glance(ord)
#> # A tibble: 1 x 8
#>   method n_sites n_species transform distance scaling stress constrained
#>   <chr>    <int>     <int> <chr>     <lgl>    <chr>    <dbl>       <dbl>
#> 1 ca           8        55 none      NA       species     NA          NA