make_heatmap: Make a Heatmap using ComplexHeatmap package.

View source: R/make_heatmap.R

make_heatmapR Documentation

Make a Heatmap using ComplexHeatmap package.

Description

This function render a Heatmap using ComplexHeatmap package.

Usage

make_heatmap(
  datasorted,
  add_annot,
  scale_data,
  row_dend,
  row_nclust,
  col_dend,
  col_nclust,
  dist_method,
  clust_method,
  col_lab,
  unit_legend,
  year_presence = TRUE,
  col_label_size = 13.2,
  bordi = c(2, 2, 2, 15)
)

Arguments

datasorted

A dataframe done with sorder_data() function. See in ?sorder_data() the "data2" parameter for help.

add_annot

A column used for the annotation (e.g. "Provincia")

scale_data

Scaling data option. Data can be scaled (using scale()) by row ("row"), by column ("column") or not scaled ("none"). The result is the z-score.

row_dend

Option for dendogram by row (TRUE or FALSE).

row_nclust

Number of cluster in the row dendrogram (a number).

col_dend

Option for dendogram by column (TRUE or FALSE).

col_nclust

Number of cluster in the column dendrogram (a number).

dist_method

Choose a distance method (e.g "euclidean"). See stats::dist() help.

clust_method

Choose a clustering method (e.g "ward.D"). See stats::hclust() help.

col_lab

A label for the column (i.e. "Polifenoli" or "Misure").

unit_legend

An unit label for the legend. If data are scaled will be "Z-score" otherwise will be the input.

year_presence

Option for data without a year column. Default is TRUE (year column present).

col_label_size

Size of the column labels. By default col_label_size = 13.2.

Examples

## Not run: 

make_heatmap(
datasorted = dtheatsorted(), 
add_annot = input$selectannot, 
scale_data = input$selscaleheat, 
dist_method = input$seldistheatpol, 
clust_method = input$selhclustheatpol,
row_dend = input$rowdend, 
row_nclust = input$sliderrowheat,
col_dend = input$columndend, 
col_nclust = input$slidercolheat
)



## End(Not run)

ShinyFabio/OliveHealthR documentation built on May 17, 2023, 1:39 a.m.