Learn R Programming

cummeRbund (version 2.14.0)

JSdist: Jensen-Shannon distance on columns

Description

JSdist takes a matrix of expression probabilites (calculated directly or output from makeprobs()) and returns a dist object of the pairwise Jensen-Shannon distances between columns

Usage

JSdist(mat,...)

Arguments

mat
A matrix of expression probabilities (e.g. from makeprobs())
...
Passthrough argument to as.dist()

Value

A dist object of pairwise J-S distances between columns.

Details

Returns pairwise Jensen-Shannon distance (in the form of a dist object) for a matrix of probabilities (by column)

References

None

Examples

Run this code

mat<-matrix(sample(1:50,50),10)
probs<-makeprobs(mat)
js.distance<-JSdist(probs)

Run the code above in your browser using DataLab