heatmapExtract: Input jpg heatmap, color scale, table dimensions. Output...

View source: R/heatmapExtract.R

heatmapExtractR Documentation

Input jpg heatmap, color scale, table dimensions. Output matrix of corresponding values.

Description

Input jpg heatmap, color scale, table dimensions. Output matrix of corresponding values.

Usage

heatmapExtract(
  heatmap,
  scale,
  scale_range = c(1, 0),
  scale_direction = "vertical",
  table_dim,
  n_samples = 1,
  verbose = TRUE
)

Arguments

heatmap

Either image array or path to cropped jpg containing heatmap color info

scale

Either image array or path to cropped jpg containing color scale info

scale_range

Numeric vector of length two containing in order the topmost and bottommost (or leftmost and rightmost) value in the color scale.

scale_direction

Character vector, "vertical" or "horizontal" describing color scale orientation.

table_dim

Numeric vector of length two containing in order the number of rows and number of columns in the heatmap image

n_samples

Number of pixels to sample per cell. By default, heatmapExtract estimates the central pixel of each cell based on the heatmap pixel dimensions and table_dim. If n_samples is set > 1, then heatmapExtract will average across multiple near-central pixels.

verbose

Logical, if true then debugging information will be printed.


brandonsie/bms documentation built on Nov. 17, 2023, 11:38 a.m.