Learn R Programming

Slant.R

Overview

slanter contains a set of functions for reordering data, and generating hierarchical clustering for ordered data, for improved visualization.

See the published R package, the rdocumentation, or the latest github version documentation for details. Specifically, the meristems vignette explains why and how to use this package.

Installation

To install it, use:

install.packages('slanter')

Usage

In general, if your data is a similarity matrix (each entry is a non-negative value that indicates how similar a pair of elements is to each other, higher is better), then use slanter::sheatmap as a drop-in replacement for pheatmap::pheatmap, and enjoy.

The lower level function slanter::slanted_orders will compute the visualization order and slanter::oclust will compute hierarchical clustering that is consistent with this order. See the published R package, the rdocumentation, or the latest github version documentation's reference section for the list and description of the available functions.

Copy Link

Version

Install

install.packages('slanter')

Monthly Downloads

122

Version

0.2-0

License

MIT + file LICENSE

Maintainer

Last Published

May 9th, 2021

Functions in slanter (0.2-0)

slanted_reorder

Reorder data rows and columns to move high values close to the diagonal.
slanted_orders

Compute rows and columns orders which move high values close to the diagonal.
sheatmap

Plot a heatmap with values as close to the diagonal as possible.
reorder_frame

Reorder the rows of a frame.
oclust

Hierarchically cluster ordered data.
meristems

Sample RNA data of similarity between batches of 1000 cells of tomato meristem cells.
reorder_hclust

Given a clustering of some data, and some ideal order we'd like to use to visualize it, reorder (but do not modify) the clustering to be as consistent as possible with this ideal order.