简体   繁体   中英

How can I visualise the distance matrix produced by vegdist in Vegan?

With the R package Vegan a distance matrix can be produced with the vegdist funciton:

distance.matrix <- vegdist(my.data)

I would like to actually show the distance matrix in a presentation to help explain what the NMDS plot of it is based on. How can I do this?

'distance.matrix' is 'Class 'dist' atomic...'. I just want to view it in a table showing how distant each site is from each other?

You want to see the distance matrix? What about typing its name?

distance.matrix
as.matrix(distance.matrix) # in full symmetric form

Or if you want to see it graphically, try

heatmap(as.matrix(distance.matrix))

Several packages probably have fancier tools.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM