
Convert two numeric ternary outcomes into a factor
xy_outcomes2factor(x, y)xy_thresholds2factor(x, y, x_threshold = 0, y_threshold = 0)
numeric vectors of -1, 0, and +1 values, indicating down regulation, uncertain response or upregulation, or numeric vectors that can be converted into such values using a pair of thresholds.
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.
Other Functions for quadrant and volcano plots: FC_format
,
geom_quadrant_lines
,
outcome2factor
,
scale_colour_outcome
,
scale_shape_outcome
,
scale_y_Pvalue
,
stat_quadrant_counts
Other scales for omics data: outcome2factor
,
scale_shape_outcome
,
scale_x_logFC
# NOT RUN {
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))
# }
Run the code above in your browser using DataLab