reorder_rows: reorder_rows

reorder_rowsR Documentation

reorder_rows

Description

Reorder the rows of an Iheatmap-class object

Usage

## S4 method for signature 'IheatmapHorizontal,integer'
reorder_rows(p, row_order)

## S4 method for signature 'IheatmapVertical,integer'
reorder_rows(p, row_order, yname = current_yaxis(p))

Arguments

p

Iheatmap-class object

row_order

integer vector

yname

name of yaxis to reorder, only applicable if object is oriented vertically

Value

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

Author(s)

Alicia Schep

See Also

add_row_clustering, reorder_cols

Examples


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

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

iheatmapr documentation built on May 29, 2024, 8:55 a.m.