dis_nmds: Dissimilarity NMDS plot

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

View source: R/dis_nmds.R

Description

Visualisation of pairwise dissimilarities

Usage

1
dis_nmds(distance, hierarchy, colour, plot, centroids, labels, legend, runs)

Arguments

distance

Matrix of pairwise dissimilarities, usually one of the matrices listed in the output object of the pair_dis() function.

hierarchy

The first column containing the sample names while the second containing the groups names. If provided, dots are coloured according to groups and group centroids can also be visualised.

colour

The number of vector items (colours, e.g. '#34k235'), must be of length one if no hierarchy table is added, or must equal the number of groups if the hierarchy table is provided.

plot

Whether to plot a NMDS or a Shepard plot. Default: "NMDS".

centroids

Whether to link sample dots with group centroids or not. A hierarchy table is necessary to draw centroids. Default: FALSE

labels

Whether to print sample or group labels or both. A hierarchy table is necessary to plot grpup names. Default: "none".

legend

Whether to print the legend or not. Default: TRUE.

runs

Number of iterations for the NMDS function. Default: 100.

Details

Dissimilarity NMDS plot

Value

An NMDS or Shepard plot.

Author(s)

Antton Alberdi, anttonalberdi@gmail.com

References

Alberdi, A., Gilbert, M.T.P. (2019). A guide to the application of Hill numbers to DNA-based diversity analyses. Molecular Ecology Resources, 19, 804-817.

Chao, A., Chiu, C.H., & Hsieh, T. C. (2012). Proposing a resolution to debates on diversity partitioning. Ecology, 93, 2037-2051.

Jost, L. (2007). Partitioning diversity into independent alpha and beta components. Ecology, 88, 2427-2439.

See Also

pair_dis, beta_dis

Examples

1
2
3
4
5
6
7
data(bat.diet.otutable)
data(bat.diet.tree)
data(bat.diet.hierarchy)
pairdisres <- pair_dis(bat.diet.otutable,qvalue=0,hierarchy=bat.diet.hierarchy)
dis_nmds(pairdisres$L1_CqN)
dis_nmds(pairdisres$L1_CqN,hierarchy=bat.diet.hierarchy, centroids=TRUE)
dis_nmds(pairdisres$L1_CqN,hierarchy=bat.diet.hierarchy, centroids=TRUE, labels="group")

anttonalberdi/hilldiv documentation built on Feb. 14, 2021, 5:08 p.m.