Thanks a lot, I tried below code but it is showing error, could please suggest how I can correct this mistake:
> physeq
phyloseq-class experiment-level object
otu_table() OTU Table: [ 67405 taxa and 162 samples ]
sample_data() Sample Data: [ 162 samples by 5 sample variables ]
tax_table() Taxonomy Table: [ 67405 taxa by 7 taxonomic ranks ]
phy_tree() Phylogenetic Tree: [ 67405 tips and 67229 internal nodes ]
> physeq_soil <- subset_samples(physeq, SampleType=="Soil")
Error in eval(e, x, parent.frame()) : object 'SampleType' not found