arrange_taxa

0th

Percentile

Sort the edge list of taxmap() objects

Sort the edge list and taxon list in taxonomy() or taxmap() objects. See dplyr::arrange() for the inspiration for this function and more information. Calling the function using the obj$arrange_taxa(...) style edits "obj" in place, unlike most R functions. However, calling the function using the arrange_taxa(obj, ...) imitates R's traditional copy-on-modify semantics, so "obj" would not be changed; instead a changed version would be returned, like most R functions.

obj$arrange_taxa(...)
arrange_taxa(obj, ...)

Arguments
obj

taxonomy() or taxmap()

...

One or more expressions (e.g. column names) to sort on. Any variable name that appears in all_names() can be used as if it was a vector on its own.

Value

An object of type taxonomy() or taxmap()

See Also

Other taxmap manipulation functions: arrange_obs(), filter_obs(), filter_taxa(), mutate_obs(), sample_frac_obs(), sample_frac_taxa(), sample_n_obs(), sample_n_taxa(), select_obs(), transmute_obs()

Aliases
  • arrange_taxa
Examples
# NOT RUN {
# Sort taxa in ascending order
arrange_taxa(ex_taxmap, taxon_names)

# Sort taxa in decending order
arrange_taxa(ex_taxmap, desc(taxon_names))

# Sort using an expression. List genera first.
arrange_taxa(ex_taxmap, taxon_ranks != "genus")

# }
Documentation reproduced from package taxa, version 0.3.3, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.