Description Usage Arguments Value See Also Examples
physeq2veg_sd is a helper function intended to convert the sample data slot of a phyloseq object to a vegan-friendly matrix.
1 | pstoveg_sd(PS)
|
PS |
(required) a phyloseq object |
A matrix containing a phyloseq object's sam_data slot.
phyloseq-class
sample_data-class
sample_data
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## Not run:
library(theseus)
library(phyloseq)
data(WWTP_Impact, package='theseus')
dim(sample_data(WWTP_Impact))
sampdat <- pstoveg_sd(WWTP_Impact)
dim(sampdat)
data(GlobalPatterns, package='phyloseq')
dim(sample_data(GlobalPatterns))
sampdat.gp <-pstoveg_sd(GlobalPatterns)
dim(sampdat.gp)
# move altered sample data back to phyloseq
sampdat.altered <- sampdat
sampdat.altered$TotDisP_PercentMax <- vegan::decostand(sampdat$TotDisP,
method='max')
sample_data(wwtp) <- as.data.frame(sampdat.altered)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.