export data from indicspecies
0
0
Entering edit mode
2.9 years ago
anthony • 0

Greetings, I just used the indicspecies package in R to evaluate the contribution of several thousand 'species' (in this case approximate sequence variants) to four unique riverine biomes (flies, rock swabs, retreat, silk net). The test runs well. However, I would like to export the ASV names, stat, and p-values to a flat file. From what I can tell, R does tests of abundance/contributions, and then places the information i'm interested in into 'Groups' with different names. Example, all ASVs contributing to the group 'fly', group 'swab' (and several other groupings). I can see what i am interested in by using the summary function on the R console on the output of multipatt.

New to biostars (and can't seem to attach my R output). regardless, i'm using R version 4.1 (on osx high sierra), indispecies installed using install.packages("indispecies"). what i want to accomplish is the same regardless of data-set, so the toy with indicspecies works just as well. From 'https://www.rdocumentation.org/packages/indicspecies/versions/1.7.9/topics/multipatt'

>library(stats)
>data(wetland) ## Loads species data
>wetkm = kmeans(wetland, centers=3) ## Creates three clusters using kmeans
## Runs the combination analysis using IndVal.g as statistic
>wetpt = multipatt(wetland, wetkm$cluster, control = how(nperm=999)) 

## Lists those species with significant association to one combination
>summary(wetpt)

And now, what i would like to do is convert the output of the 'summary(wetpt)' function to a tab delimited file, where with the 'stat', 'p-value' as columns, and 'species' as rows.

multipatt R • 830 views
ADD COMMENT

Login before adding your answer.

Traffic: 1498 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6