redim_matrix: redim_matrix

View source: R/redim_matrix.R

redim_matrixR Documentation

redim_matrix

Description

This function summarizes a matrix into the desired numbe rof rows and columns.

Usage

redim_matrix(
  mat,
  target_height = 100,
  target_width = 100,
  summary_func = function(x) mean(x, na.rm = TRUE),
  output_type = 0,
  n_core = 1
)

Arguments

mat

A list of counts across peak summits generated by SummitHeatmap.

target_height

The desired number of rows of the output matrix.

target_width

The desired number of columns of the output matrix.

summary_func

The function to use for summarising the matrix.Default=mean.

output_type

The type of output matrix.

n_core

Numebr of cores to sue for calculation.

Details

It was taken from this reference: https://gdevailly.netlify.app/post/plotting-big-matrices-in-r/

Value

A matrix of the size target_height by target_width that summarizes the original matrix.


fmi-basel/gbuehler-MiniChip documentation built on June 13, 2025, 6:15 a.m.