Learn R Programming

dartR (version 1.1.11)

gl.dist.heatmap: Represent a distance matrix as a heatmap

Description

The script plots a heat map to represent the distances in the distance or dissimilarity matrix

Usage

gl.dist.heatmap(dst, ncolors = 5, labels = TRUE, values = TRUE,
  rank = FALSE, v = 2)

Arguments

dst

-- name of the distance matrix [required]

ncolors

-- number of colors to display [default 5]

labels

-- if TRUE, and the number of rows is <= 20, labels are added to the heatmap [default = TRUE]

values

-- if TRUE, and the number of rows is <= 20, distances are added to the body of the heatmap [default = TRUE]

rank

-- if TRUE, then the distance matrix will be reordered to group like with like, otherwise order will be displayed as given [default FALSE]

v

-- verbosity: 0, silent or fatal errors; 1, begin and end; 2, progress log ; 3, progress and results summary; 5, full report [default 2]

Examples

Run this code
# NOT RUN {
   gl <- testset.gl[1:10,]
   d <- dist(as.matrix((gl)))
   gl.dist.heatmap(d)
   gl.dist.heatmap(d, ncolors=10, rank=TRUE)
# }

Run the code above in your browser using DataLab