Learn R Programming

RJSplot (version 2.7)

symheatmap_rjs: Creates a Symetric Heatmap representation.

Description

symheatmap_rjs creates an interactive symetric heatmap.

Usage

symheatmap_rjs(links, nodes = NULL, group = NULL, label = NULL, cex = 1,
               plot = TRUE, jupyter = FALSE, dir = tempdir())

Arguments

links

an edge list table stored in a data frame with three possible columns (source node id, target node id and a link value).

nodes

a node list stored in a data frame object with rownames as node id.

group

a vector giving the column of nodes to show as group.

label

a vector giving the column of nodes to show as label.

cex

number indicating the amount by which plotting text and symbols should be scaled relative to the default.

plot

open resulting graph in your browser.

jupyter

embed the graph as an iframe into a Jupyter Notebook.

dir

a "character" string representing the directory where the graph will be saved.

Value

The function creates a folder in your computer with an HTML document named index.html which contains the graph. This file can be directly opened with your browser.

See Also

The ‘RJSplot’ Website: https://rjsplot.usal.es

dendrogram_rjs, densityplot_rjs, genomemap_rjs, heatmap_rjs, manhattan_rjs, network_rjs, scatterplot_rjs, symheatmap_rjs, wordcloud_rjs, boxplot_rjs, bubbles_rjs, hiveplot_rjs, piechart_rjs, barplot_rjs, tables_rjs, surface3d_rjs, scatter3d_rjs.

Examples

Run this code
# NOT RUN {
## Create an interactive symetric heatmap in a temporal directory of your local machine
## Live examples on https://rjsplot.usal.es

if(interactive()){
# prepare data
x <- 1-cor(t(mtcars))

source <- rep(rownames(x),nrow(x))
target <- rep(rownames(x),rep(ncol(x),nrow(x)))
links <- data.frame(source=source,target=target,value=as.vector(x))

# Create symetric heatmap
symheatmap_rjs(links, mtcars, group = "cyl")
}
# }

Run the code above in your browser using DataLab