View source: R/outcome2factor.r
xy_outcomes2factor | R Documentation |
Convert two numeric ternary outcomes into a factor
xy_outcomes2factor(x, y)
xy_thresholds2factor(x, y, x_threshold = 0, y_threshold = 0)
x , y |
numeric vectors of -1, 0, and +1 values, indicating down regulation, uncertain response or up-regulation, or numeric vectors that can be converted into such values using a pair of thresholds. |
x_threshold , y_threshold |
numeric vector Ranges enclosing the values to be considered uncertain for each of the two vectors.. |
This function converts the numerically encoded values into a factor
with the four levels "xy"
, "x"
, "y"
and "none"
.
The factor created can be used for faceting or can be mapped to aesthetics.
This is an utility function that only saves some typing. The same
result can be achieved by a direct call to factor
. This
function aims at making it easier to draw quadrant plots with facets
based on the combined outcomes.
Other Functions for quadrant and volcano plots:
FC_format()
,
outcome2factor()
,
scale_colour_outcome()
,
scale_shape_outcome()
,
scale_y_Pvalue()
Other scales for omics data:
outcome2factor()
,
scale_colour_logFC()
,
scale_shape_outcome()
,
scale_x_logFC()
xy_outcomes2factor(c(-1, 0, 0, 1, -1), c(0, 1, 0, 1, -1))
xy_thresholds2factor(c(-1, 0, 0, 1, -1), c(0, 1, 0, 1, -1))
xy_thresholds2factor(c(-1, 0, 0, 0.1, -5), c(0, 2, 0, 1, -1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.