Learn R Programming

iheatmapr (version 0.7.1)

add_row_dendro: add_row_dendro

Description

Adds row dendrogram to iheatmap object

Usage

# S4 method for Iheatmap,hclust
add_row_dendro(
  p,
  dendro,
  reorder = TRUE,
  side = c("left", "right"),
  size = 0.15,
  buffer = 0.005,
  xname = NULL,
  yname = current_yaxis(p),
  sname = "row_dendro"
)

Value

Iheatmap-class object, which can be printed to generate an interactive graphic

Arguments

p

iheatmap object

dendro

hclust object

reorder

reorder rows based on dendrogram order?

side

side of plot on which to add dendrogram

size

relative size of dendrogram (relative to the main heatmap)

buffer

amount of space to leave empty before this plot, relative to size of first heatmap

xname

internal name of xaxis

yname

internal name of yaxis

sname

internal name of shapes

Author

Alicia Schep

See Also

add_row_clustering, iheatmap, add_col_dendro

Examples

Run this code

mat <- matrix(rnorm(20), ncol = 5, nrow = 4)  
dend <- hclust(dist(mat))
hm <- iheatmap(mat) %>% add_row_dendro(dend)

# Print heatmap if interactive session 
if (interactive()) hm 

Run the code above in your browser using DataLab