Skip to contents

Bivariate color interpolation function with optional floors

Usage

col_pvdir_xf(
  p_cutoff = 0.01,
  p_floor = 1e-10,
  direction_cutoff = 0,
  direction_max = 2,
  color_non_hits = FALSE,
  pretty.n = c(10, 5),
  ...
)

Arguments

p_cutoff

numeric P-value threshold, default 0.01

p_floor

numeric P-value lowest recognized value, default 1e-10

direction_cutoff

numeric directional score cutoff, default 0 applies no cutoff.

direction_max

numeric directional maximum recognized, default 2.

color_non_hits

logical whether to apply color when the P-value does not meet the p_cutoff, default FALSE uses white for non-hits.

pretty.n

integer number of labels used with pretty() for rows and columns, respectively. Default is 10 and 5.

...

additional arguments are ignored.

Value

function

Examples

col_fun <- col_pvdir_xf()
attr(col_fun, "row_labels")
#> [1] "0"  "<2" "2"  "6"  "10"
display_colorRamp2D(col_fun, pretty.n=c(10, 5))


col_fun1 <- col_pvdir_xf(direction_cutoff=1)
attr(col_fun1, "row_labels")
#> [1] "0"  "<2" "2"  "6"  "10"
display_colorRamp2D(col_fun1, pretty.n=c(10, 5))


col_fun <- col_pvdir_xf(
   p_cutoff=0.05,
   direction_cutoff=1
)
display_colorRamp2D(col_fun)