intervalHeatmap: Interval heatmap

View source: R/plots.R

intervalHeatmapR Documentation

Interval heatmap

Description

Plots the mean value of a value Z when divided into groups defined by intervals at variables X and Y

Usage

intervalHeatmap(
  x,
  y,
  z,
  x_n,
  y_n,
  nCores = 1,
  dig.lab = 1,
  outputMatrix = FALSE,
  dispNum = TRUE,
  na.rm = TRUE,
  FUN = "mean"
)

Arguments

x

numeric. X dimension

y

numeric. Y dimension

z

logical or numeric. Z dimension to be summarized

x_n

numeric. Number of groups for x dimension to be cut into

y_n

numeric. Number of groups for y dimension to be cut into

nCores

numeric. Number of cores to use to process data

dig.lab

numeric. Number of decimal positions to place in labels

outputMatrix

logical. Set to TRUE to output instead the matrix

dispNum

logical. Set to FALSE for not showing the numeric labels at each cell

na.rm

logical. Indicating if NA values should be removed to calculate mean Z. Default: TRUE.

FUN

character. Name of function to be used over the values that fall inside the combinations of x and y intervals. e.g. "mean" or "sum".

Value

matrix / pheatmap

Examples

intervalHeatmap(x = iris$Sepal.Length, y = iris$Sepal.Width,
                z = rep(1, nrow(iris)), x_n = 5, y_n = 5, FUN = "sum")

AngelCampos/m.shortcuts documentation built on Feb. 25, 2024, 4:06 a.m.