Learn R Programming

propr (version 4.2.6)

getRatios: Get (Log-)ratios from Object

Description

This function provides a unified wrapper to retrieve (log-)ratios from propr and propd objects.

Usage

getRatios(object, cutoff = NA, include = NA, or = TRUE,
  melt = FALSE)

Arguments

object

A propr or propd object.

cutoff

This argument indicates the value at which to cutoff the results. For "rho" and "cor", the function returns pairs with a value greater than the cutoff. For "theta", "phi", and "phs", the function returns pairs with a value less than the cutoff. Leave the argument as NA to return all results.

include

This argument indicates which features by name should belong to a pair for that pair to get included in the results. Subset performed by Partner %in% subset | Pair %in% subset.

or

A boolean. If FALSE, include subsets by Partner %in% subset & Pair %in% subset.

melt

A boolean. Toggles whether to melt the results for visualization with ggplot2.

Value

A data.frame of (log-)ratios.

Details

When the alpha argument is provided, this function returns the (log-)ratios as (partner^alpha - pair^alpha) / alpha.