object_config: Set taxonomy summary configuration

View source: R/object_config.R

object_configR Documentation

Set taxonomy summary configuration

Description

This function set taxonomy summary configuration by assigning treatment column number, facet column number, replication column number, treatment mapping color, treatment order and facet order.

Usage

object_config(
  taxobj,
  treat_location,
  facet_location = NULL,
  rep_location,
  subject_location = NULL,
  treat_col = NULL,
  treat_order = NULL,
  facet_order = NULL
)

Arguments

taxobj

Taxonomic summary object generated by tax_summary

treat_location

Numeric. Treatment column number in metafile/groupinformation.

facet_location

Numeric, default:NULL. Facet column number in metafile/groupinformation.

rep_location

Numeric. Replication column number in metafile/groupinformation.

subject_location

Numeric, default:NULL.Subject column number in metafile/groupinformation (used for pairwise experiment).

treat_col

Named character string, default:NULL. A set of aesthetic character to map treatment to.

treat_order

Character string, default:NULL. The character string indicating treatment displaying order.

facet_order

Character string, default:NULL. The character string indicating facet displaying order.

Value

object_config returns taxonomy summary object with configuration.

Author(s)

Wang Ningqi2434066068@qq.com

Examples

{
  ### Data preparation ###
  data(testotu)
  groupinformation <- data.frame(
    group = c(rep("a", 10), rep("b", 10)),
    factor1 = rnorm(10),
    factor2 = rnorm(mean = 100, 10),
    subject = factor(c(1:10, 1:10)),
    group2 = c(rep("e", 5), rep("f", 5), rep("e", 5), rep("f", 5))
  )

  ### Packaging metafile, community data, and taxonomy table ###
  test_object <- tax_summary(
    groupfile = groupinformation,
    inputtable = testotu[, 2:21],
    reads = TRUE,
    taxonomytable = testotu[, c(1, 22)]
  )

  ### Object configuration ###
  test_object_plan1 <- object_config(
    taxobj = test_object,
    treat_location = 1,
    rep_location = 4
  )

  ### Facet configuration ###
  test_object_plan2 <- object_config(
    taxobj = test_object,
    treat_location = 1,
    rep_location = 4,
    facet_location = 5
  )
}

LorMe documentation built on Sept. 13, 2024, 9:07 a.m.

Related to object_config in LorMe...