taxa (version 0.1.0)

arrange_obs: Sort columns of taxmap() objects

Description

Sort columns of tables in obj$data in taxmap() objects. Any variable name that appears in all_names() can be used as if it was a vector on its own. See dplyr::arrange() for the inspiration for this function and more information.

obj$arrange_obs(target, ...)
arrange_obs(obj, target, ...)

Arguments

obj

An object of type taxmap().

target

The name of the table in obj$data to filter.

...

One or more expressions (e.g. column names) to sort on.

Value

An object of type taxmap()

See Also

Other taxmap manipulation functions: arrange_taxa, filter_obs, filter_taxa, mutate_obs, sample_frac_obs, sample_frac_taxa, sample_n_obs, sample_n_taxa, select_obs, transmute_obs

Examples

Run this code
# NOT RUN {
# Sort in ascending order
arrange_obs(ex_taxmap, "info", n_legs)
arrange_obs(ex_taxmap, "foods", name)

# Sort in decending order
arrange_obs(ex_taxmap, "info", desc(n_legs))

# }

Run the code above in your browser using DataLab