Learn R Programming

LorMe (version 1.1.0)

sub_tax_summary: Subsetting tax summary objects

Description

Subsetting tax summary objects

Usage

sub_tax_summary(taxobj, ..., specificnum = NULL, taxnum = NULL)

Value

Subset of tax summary objects.Same as tax_summary.

Arguments

taxobj

tax summary objects computed by tax_summary.

...

logical expression that are are defined in terms of the variables in Groupfile of tax summary objects. See details in subset.

specificnum

specific numbers indicating samples to keep based on Groupfile of tax summary objects.

taxnum

specific numbers indicating taxonomy to keep based on Base file

Author

Wang Ningqi 2434066068@qq.com

Examples

Run this code
  data("Three_group")

  # Check meta file
  print(Three_group$Groupfile)

  # Subsetting tax summary objects

  # Select BF and OF groups
  sub_testtax_summary <- sub_tax_summary(Three_group, Group %in% c("BF", "OF"))
  print(sub_testtax_summary$Groupfile)

  # Subsetting according to taxonomy

  Proteo <- sub_tax_summary(
    Three_group,
    taxnum = which(Three_group$Base_taxonomy$Phylum == "p__Proteobacteria")
  )
  print(Proteo$Phylum_percent)  # Check phylum table
  print(Proteo$Genus_percent)   # Check genus table

Run the code above in your browser using DataLab