1

I am using the vegdist() function in the R package vegan to generate an association matrix for a species abundance dataset (the association matrix produced is 936 by 936). I want to be able to export/extract/coerce this association matrix into a dataframe or format writeable as a .csv so that I can use it for subsequent analyses. I know you can use the output from vegdist() for things like ordination after, or visualize using heat maps (coldiss()), but in this case I want to actually be able to see and manipulate the raw association matrix.

Any ideas? I wasn't sure that sample data would really help in this case since it is such a large dataset.

4

1 回答 1

3

尝试:

write.csv(as.matrix(YOUR_MATRIX), "YOUR_MATRIX.csv")
于 2013-11-19T00:47:05.013 回答